Skip to content

Build a mini Retrieval-Augmented Question Answering RAG app that can answer questions from a set of PDF documents

Notifications You must be signed in to change notification settings

Shanu06github/RAG_PRACTICAL_ASSESSMENT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Developer Practical Assessment

Objective: Build a mini Retrieval-Augmented Question Answering RAG app that can answer questions from a set of PDF documents using embeddings and an LLM API (can use OpenAI / Gemini / Hugging Face).

TOOLS:

LLM MODEL = Google Gemini

EMBEDDINGS = HuggingFaceEmbeddings

VECTORDB = Faiss

CODE EXPLANATION:

I have added two functions create_vector_db and get_qa_chain.

create_vector_db:

get pdf documents from the folder
clean the text 
split into chunks
then add embeddings for each chunks
stores and save in a vectordb (FAISS)

get_qa_chain:

loads the saved vectordb(FAISS)
User's questions converted into embeddings
get the top 3 similar chunks from the vectordb using retriever
create a prompt template
give the prompt template along with the similar context to the llm
llm will regenerate the response based on the available context

About

Build a mini Retrieval-Augmented Question Answering RAG app that can answer questions from a set of PDF documents

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published