Legal Research

Doctrina

Doctrina is a Spanish tax and legal research platform built to make public doctrine searchable by meaning, not just by exact keywords.

doctrina.cristiandominguez.com
Doctrina legal research interface showing Spanish tax search results
Status
Live site / active research platform
Role
Builder, product designer, retrieval-system architect
Domain
Spanish tax doctrine, tribunal decisions, jurisprudence
Core idea
Semantic search, hybrid retrieval, cited answers

Why it exists

Spanish tax research is public in theory, but difficult in practice. The important material is spread across sources, formats, search systems, and legal language that does not always match the way a person naturally asks the question.

Doctrina started from a practical need: find relevant DGT consultas vinculantes, TEAC resolutions, jurisprudence, and consolidated legislation without relying on a closed professional database.

The product is not trying to replace professional legal judgment. It is trying to make the public research layer faster, more legible, and easier to verify.

What I built

Doctrina combines a Spanish-language search interface with a local retrieval stack: scraped public corpora, structured metadata, embeddings, hybrid search, reranking, and optional RAG answers with citations.

Public legal corpus

The system indexes Spanish tax doctrine and related legal sources, including DGT consultas, TEAC resolutions, CENDOJ jurisprudence, and consolidated legislation.

Hybrid retrieval

Keyword matching and semantic search are combined so the system can catch both exact legal terms and meaning-level matches.

Reranked results

Candidate results are rescored so the highest-value documents rise above noisy keyword matches or embedding near-misses.

Cited synthesis

RAG mode is designed to answer with references back to source documents, so the user can inspect the underlying doctrine instead of trusting a generated summary.

Decisions that mattered

Search first, AI second. The core product value is retrieval quality. The AI layer is useful only if the source set is strong enough to support it.

Spanish legal language is the product surface. The interface and corpus are built around the domain vocabulary: consultas vinculantes, resoluciones, normativa, contestacion, organo, and fecha.

Keep the infrastructure independent. Doctrina runs as its own Cloudflare Pages project and API path, so personal-site routing changes cannot silently break the research product.

Prefer inspectability over polish. A legal research answer should expose the source trail. The product is useful when a user can move from query to result to citation without losing confidence in where the answer came from.

Doctrina applies AI to a high-stakes public-information domain: legal research where retrieval quality, source citations, and interface discipline matter more than chat novelty.

Doctrina treats legal AI as a retrieval problem first: find the right source, preserve the context, then summarize only when the evidence is visible.

Why it holds up

Doctrina works when it treats legal AI as search infrastructure, not answer theater. The value is in finding the right public source, preserving the legal context, and keeping the citation visible.

It also matters because the system is built around Spanish legal language and Spain-specific sources instead of forcing the domain into generic English-language retrieval defaults.