Skip to content

clarcolaco/rag-llm-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About the project

This project is a FastAPI application that allows users to chat with a PDF document. It utilizes a sophisticated Retrieval-Augmented Generation (RAG) architecture to handle large files efficiently. The workflow is as follows: first, the user uploads a PDF, which the application processes using PyMuPDF to extract the text. This text is then broken down into smaller chunks, which are converted into numerical representations (embeddings) using the Google Gemini API. These embeddings are stored in a high-performance FAISS vector store. When a user asks a question, the application searches this store to find and retrieve only the most relevant text chunks from the document. Finally, these retrieved chunks, along with the original question, are sent to the Gemini model to generate a precise, contextual, and accurate answer based solely on the provided document content.

Run local

uvicorn app:app --reload

Example

Using gemini to upload a pdf file

alt text

Using the id to ask about the document

alt text

The answer in portuguese

alt text

And answer in english

alt text

Asking the resume

alt text alt text

@clarcolaco - 2025

About

his project is a FastAPI application that allows users to chat with a PDF document. It utilizes a sophisticated Retrieval-Augmented Generation (RAG) architecture to handle large files efficiently. The workflow is as follows: first, the user uploads a PDF.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors