PT EN
Back to site

Appeal Co-pilot — A Real, Substantiated Appellate Brief

Drafting an appellate brief from scratch — identifying the parties, gathering the applicable articles, finding the precedents behind each thesis — consumes hours of the team's most qualified work. The Appeal Co-pilot delivers, in seconds, a complete, real brief ready for filing: with the case's true parties, the applicable legal provisions and the case law associated with each one — not a generic draft full of gaps.

The brief combines three sources:

  1. The case's real parties (appellant, appellee, judges, adjudicating body), read from the correct context database in Neo4j.
  2. The articles of the procedural code applicable to the case — both those cited in the case files and those pertinent on the merits — with the case law associated with each article.
  3. The legal drafting done by an AI model acting as a "learned jurist", guided by configurable instructions.

The result appears in a window in Chat (AnalisarChat) and can be downloaded as Word (.docx). The breadcrumb follows the system standard: DATTA › Analisar › Chat.


How to generate an appeal

The Criar Recurso button appears automatically when you hover over an AI answer that mentions the availability of an appeal — the screen itself recognizes expressions such as "cabe recurso", "apelação", "recurso especial", "agravo de instrumento", "embargos de declaração" or "prazo para recurso".

  1. Click Criar Recurso. The window opens with the loading state: "Gerando o recurso com IA..." and the note "Isso pode levar alguns segundos" — generation involves several analysis steps, so it is not instantaneous.
  2. The platform extracts the case number from the conversation itself and triggers the generation.
  3. When it finishes, the brief is shown in the window with section titles and bold highlights.

The brief follows the standard legal structure: addressing, identification of the parties, timeliness and admissibility, facts, law/grounds — each thesis anchored in an article and a precedent —, requests and a closing with place, date and space for a signature.

The AI is instructed to never invent generic party names (like "EMPRESA XYZ LTDA" or "Fulano de Tal") nor leave [COMPLETAR] markers. If a marker still shows up, it is highlighted in yellow in the text for your review.

Choosing the appeal type

In the window footer, a selector defines the appeal type. The choice guides both the identification of the applicable articles and the drafting of the brief. The initial default is Apelação.

Displayed optionInternal value
ApelaçãoApelacao
Recurso EspecialRecursoEspecial
Recurso ExtraordinárioRecursoExtraordinario
Agravo InternoAgravoInterno
Agravo de InstrumentoAgravoDeInstrumento
Embargos de DeclaraçãoEmbargosDeDeclaracao

Downloading as Word (.docx)

Once generation is complete, the Baixar Word (.docx) button becomes available in the footer. The file is a real .docx, produced on the server — without depending on external libraries in the browser — with:

  • a centered bold title (appeal type + case number);
  • section headings, inline bold, lists and justified paragraphs.

The file name follows the pattern recurso-<numero-do-processo>.docx. The conversion to .docx reuses the text that was already generated: it does not call the AI again, it is formatting only.

Nothing is lost: if the .docx download fails for any reason, the platform still delivers the content as a .md (markdown) file.

When the environment has Google credentials configured, the Abrir no Google Docs button also appears, leading to an editable copy of the brief in Google Docs. Without those credentials nothing breaks — the text and the .docx download work normally, with no error and no blocked functionality.

Continue in Chat — a conversation starting from the case

When the conversation is born from the case detail panel (the Continuar no Chat button), the AI's answers come as clean text, without the structured document cards that appear in normal search — the focus stays on the case analysis and on the decision to generate the appeal.

In this mode the answers also arrive complete, without the "Expandir" control, so reading the context and deciding are straightforward.

Hands-on example

  1. In the case screening, the case shows up with the appealability field filled in — "Apelação", for instance. Click Continuar no Chat.
  2. Ask the AI: "Quais são os fundamentos para recorrer da sentença?" On the answer, hover and click Criar Recurso.
  3. Wait for the generation and check in the footer that the type is Apelação.
  4. Review the brief — real parties, theses anchored in articles and precedents — and click Baixar Word (.docx) to finish it in your editor.

Configuring the behavior (admin)

The drafting instructions currently apply from the built-in default — one that already requires a complete brief, real parties and zero pending markers.

The tuning screen is gone; the prompt stayed. Until 2026-08-23 the instructions were editable in Sistema › Co-pilots, a screen removed when DATTA Captain replaced the operating copilots. The saved text is still stored and still read when the brief is drafted — anyone who had a customization keeps it, anyone who did not stays on the default.

And the prompt gained a second reader: when DATTA Captain plans an operation for a reasoned brief, it receives this same text as domain knowledge — to gather the right inputs before firing. It does not draft the brief: this service still does that.

The procedural code database from which the articles and case law come, and the context database where the case is stored, are resolved dynamically from the context's settings, never fixed in code. Each context can point to the appropriate procedural code (e.g. CPC, CPP).

Always a clear answer

The feature handles every scenario without exposing technical messages:

  • Loading"Gerando o recurso com IA..." while the brief is produced.
  • Generation failure — a message in Portuguese inside the window itself: "Erro ao gerar o recurso. Tente novamente."
  • No connection to the service"Não foi possível conectar ao serviço. Verifique se o sistema está disponível."
  • Usage limit reached — appeal generation has a lower hourly limit than regular chat, because it consumes a lot of AI processing. When it is exceeded, you are warned in a friendly way and can try again later.
  • Case without data or without parties — when the case number is not found in any context database, the brief is drafted in a legally neutral way, without inventing names; review the result before filing.

How it works under the hood (summary)

For administrators and technical teams:

  • Generating the brief and converting it to .docx both require the CHAT_SEND permission.
  • Generation is limited to 20 calls per hour per user by default, configurable in SistemaGeral.
  • The generation flow fetches the case from Neo4j, sweeping the context databases until the number is found; identifies the applicable articles (those cited in the text plus the ones pointed out by the AI); fetches articles and case law from the context's procedural code database; drafts the brief with the AI, removing any conversational preamble; and, optionally, creates the copy in Google Docs.
  • Appeal generation is also available through the API — see the API reference.

Related documents: Case Audit Detail (the source of the final decision and appealability fields) and Search and Chat.