DocuChat
Un asistente que responde preguntas sobre tus PDF con generación aumentada por recuperación (RAG) y te enseña de qué documento sale cada respuesta. Si algo no está en tus documentos, lo dice.An assistant that answers questions about your PDFs with retrieval-augmented generation (RAG) and shows which document each answer comes from. If something is not in your documents, it says so.
- PeriodoPeriod
- 2026
- EquipoTeam
- Proyecto personalPersonal project
- ContextoContext
- Proyecto propio, desplegado con Docker ComposeOwn project, deployed with Docker Compose
- Mi papelMy role
- Todo: backend, búsqueda, agente, evaluación e interfazEverything: backend, search, agent, evaluation and interface
- TecnologíasTech stack
- Python
- FastAPI
- PostgreSQL
- pgvector
- Ollama
- Gemini
- React
- Docker Compose

Qué haceWhat it does
- Trocea tus PDF, calcula sus embeddings con nomic-embed-text y los guarda en PostgreSQL con pgvector.Splits your PDFs, embeds them with nomic-embed-text and stores them in PostgreSQL with pgvector.
- Respondes en lenguaje natural y cada respuesta cita los documentos de origen.You ask in plain language and every answer cites its source documents.
- Funciona entero en local con Ollama o con Gemini en la nube, según una variable de entorno.It runs fully locally with Ollama or with Gemini in the cloud, switched by an environment variable.
Cómo está hechoHow it is built
- Búsqueda híbrida. La búsqueda vectorial fallaba con preguntas cortas como «¿Qué es el PMBOK?»: el fragmento correcto ni entraba en el top-k. Al combinarla con la búsqueda de texto completo de PostgreSQL y fusionar ambas con Reciprocal Rank Fusion, ese fragmento pasó al primer puesto.Hybrid search. Vector search failed on short questions like “What is the PMBOK?”: the right passage did not even make the top-k. Combining it with PostgreSQL full-text search and fusing both with Reciprocal Rank Fusion moved that passage to first place.
- Agente con herramientas. En cada pregunta el modelo decide si busca en los documentos o consulta la fecha. Comparé Ollama y Gemini: los dos eligen bien; Ollama es gratis y privado, Gemini pule algo más las respuestas.Tool-calling agent. For each question the model decides whether to search the documents or check the date. I compared Ollama and Gemini: both choose well; Ollama is free and private, Gemini polishes answers a little more.
- Observabilidad. Cada consulta guarda proveedor, herramientas, fragmentos recuperados y latencia, para medir en vez de suponer.Observability. Every query stores provider, tools, retrieved passages and latency, to measure instead of guess.
ResultadosResults
- de recall@8: la fuente correcta aparece entre los 8 primeros fragmentosrecall@8: the right source shows up in the top 8 passages
- 60 %
- preguntas en el conjunto de evaluaciónquestions in the evaluation set
- 15
- proveedores de modelos: Ollama en local y Geminimodel providers: local Ollama and Gemini
- 2
Una primera versión de la evaluación daba un 93 %, pero contaba como acierto fragmentos genéricos que no respondían a la pregunta. Al corregirla, la cifra real es un 60 %, y los fallos se concentran en preguntas conceptuales amplias.A first version of the evaluation gave 93%, but it counted generic passages that did not answer the question as hits. Once corrected, the real figure is 60%, with failures concentrated in broad conceptual questions.
GaleríaGallery



¿Hablamos?Let’s talk
Soy de Sevilla y ahora vivo en Madrid. Me gusta que las cosas funcionen de principio a fin: diseñar el sistema, escribir el código, desplegarlo y medir si de verdad responde bien.I’m from Seville and now live in Madrid. I like things to work end to end: designing the system, writing the code, deploying it and measuring whether it really holds up.
Si buscas a alguien para backend, datos o IA aplicada, escríbeme y te respondo.If you’re looking for someone for backend, data or applied AI work, write to me and I’ll get back to you.