Public legal corpus
The system indexes Spanish tax doctrine and related legal sources, including DGT consultas, TEAC resolutions, CENDOJ jurisprudence, and consolidated legislation.
Doctrina is a Spanish tax and legal research platform built to make public doctrine searchable by meaning, not just by exact keywords.
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.
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.
The system indexes Spanish tax doctrine and related legal sources, including DGT consultas, TEAC resolutions, CENDOJ jurisprudence, and consolidated legislation.
Keyword matching and semantic search are combined so the system can catch both exact legal terms and meaning-level matches.
Candidate results are rescored so the highest-value documents rise above noisy keyword matches or embedding near-misses.
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.
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 treats legal AI as a retrieval problem first: find the right source, preserve the context, then summarize only when the evidence is visible.
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.