Harvey-9B

Aquiles-Image Logo

A legal reasoning model specialized in Salvadoran jurisprudence

Model Summary

Harvey-9B is a fine-tuned language model designed to reason about Salvadoran law and jurisprudence. It was trained on a synthetic dataset derived from 3,311 real judicial resolutions from El Salvador's official jurisprudence portal, covering constitutional, criminal, family, civil, administrative, labor, and environmental law.

The model does not memorize legal articles; it learns judicial reasoning patterns: how Salvadoran courts identify legal issues, articulate applicable norms, reference jurisprudential criteria, and calibrate uncertainty. It is designed to be used alongside a tool that retrieves the actual legal texts, not as a standalone legal encyclopedia.

Note: You can find more details in the technical blog post we published, "Building Harvey: Legal AI Fine-Tuning for El Salvador"

Note: The model's checkpoint has been updated (10/4/2026) because the initial checkpoint had lost its tool calling capabilities, and this new checkpoint retains them along with all the legal reasoning from the previous version.

Intended Use

Harvey-9B is designed for three types of users:

Citizens without legal knowledge — understanding what the law says about their situation, what rights they have, and what the general steps of a legal process look like. No technical jargon assumed.

Law students — reasoning about cases, articulating normative conflicts, citing exact sources with article and law, and explaining why a jurisprudential criterion applies or not to a specific case.

Lawyers — a starting point for fast legal research: "What criterion has the Sala established on X?", "Which laws apply to this case?". Not a replacement for professional judgment — a tool to accelerate it.

How It Reasons

Every response follows a structured reasoning pattern extracted from real Salvadoran judicial resolutions:

  1. Problem identification — What is the core legal issue?
  2. Applicable framework — Which laws and articles apply and why?
  3. Jurisprudential analysis — What has this court established on this matter?
  4. Application to the case — How does the framework apply to these specific facts?
  5. Uncertainty calibration — One of three levels:
    • CLEAR: Explicit law + consolidated jurisprudential criteria
    • INTERPRETATION: Law exists but requires interpretation, or criteria are not definitive
    • MANDATORY CONSULTATION: Irreversible consequences, disputed facts, or no consolidated Salvadoran jurisprudence

What This Model Will NOT Do

Harvey-9B is explicitly trained to refuse or flag:

  • Providing certainty where none exists — If a question involves disputed facts, deliberate legal ambiguity, or an area where no clear criterion has been established, the model says so explicitly instead of fabricating a confident answer.
  • Replacing legal advice in high-stakes cases — Situations involving deprivation of liberty, loss of parental rights, asset forfeiture, or other irreversible consequences always end with a recommendation to consult a licensed attorney.
  • Drafting documents with legal effects — Contracts, lawsuits, deeds. Completely out of scope.
  • Opining on facts it cannot verify — The model separates "if the facts are as you describe, the law says X" from "whether that is true is something only a legal process can determine."

Usage

Recommended: vLLM Server

vllm serve "Aquiles-ai/Harvey-9B" \
  --served-model-name "Harvey-9B" \
  --async-scheduling \
  --host "0.0.0.0" \
  --port 5500 \
  --reasoning-parser "qwen3" \
  --enable-auto-tool-choice \
  --tool-call-parser "qwen3_coder" \
  --api-key "your-api-key" \
  --max-model-len 102400 \
  --gpu-memory-utilization 0.90 \
  --trust-remote-code

Python Client

from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:5500/v1",
    api_key="your-api-key"
)

response = client.chat.completions.create(
    model="Harvey-9B",
    messages=[
        {
            "role": "user",
            "content": "Un fiscal presentó un recurso de apelación contra la resolución que otorgó medidas cautelares sustitutivas, pero solo argumentó de forma vaga que la decisión era incorrecta sin señalar qué norma se violó. ¿Fue correcto que la Cámara declarara inadmisible ese recurso?"
        }
    ],
    temperature=0.3,
)

print(response.choices[0].message.content)

Limitations and Risks

  • Training data cutoff: The jurisprudential corpus covers resolutions published between January 2025 and March 2026. Legal reforms or new jurisprudential criteria established after this period will not be reflected in the model's reasoning.
  • Geographic scope: Harvey-9B reasons exclusively about Salvadoran law. It should not be used for legal questions from other jurisdictions.
  • No real-time retrieval: The model reasons from patterns learned during training. For production use, it should be paired with a retrieval tool that accesses current legal texts.
  • Hallucination risk in ambiguous areas: In areas without consolidated Salvadoran jurisprudence, the model may generate plausible-sounding but unverified legal reasoning. The uncertainty calibration system (CLEAR / INTERPRETATION / MANDATORY CONSULTATION) is designed to flag these cases, but it is not infallible.
  • Not a substitute for legal counsel: This model is an orientation tool. Cases with irreversible consequences always require a licensed attorney.

Ethical Considerations

The training corpus consists of public judicial resolutions. Names of litigants, lawyers, and judges present in source documents were anonymized both in the original portal (redacted with ****) and enforced at the synthetic data generation stage; no personally identifiable information appears in the training examples.

Harvey-9B is not intended to predict case outcomes, evaluate the quality of judicial decisions, or replace human legal judgment. Its purpose is to make Salvadoran jurisprudence more accessible and to accelerate legal research.

License

This model is released under the Apache 2.0 License.

The training data is derived from public judicial resolutions from El Salvador's official jurisprudence portal. Synthetic examples were generated for research and educational purposes.

Built by Fredy Rivera - Aquiles-ai

Downloads last month
346
Safetensors
Model size
10B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Aquiles-ai/Harvey-9B

Collection including Aquiles-ai/Harvey-9B