๐Ÿ’ฌRAG pipeline

Provide direct, dynamic answers from databases, making data access swift and user-friendly.

GenAI Stack Workflow for Knowledge Base Question & Answer

rag_genai_stack

Installing GenAI Stack

Componets used for implementation

  • gpt-3.5-turbo as LLM

  • Chromadb as Vectorstore

  • sentence-transformers/all-mpnet-base-v2 sentence transformer for text embeddings

  • Langchain Framework

Import Required GenAI Stack Components

Instantiate ETL component by providing configuration according to source data type.

  • Here the input source is .pdf file

Instantiate the LLM

Instantiate the Vectorstore

Instantiate the Retriver

Instantiate the Prompt engine

Prompt engine constructs the prompt template for instructing the LLM

Instantiate Memory

Setup the GenAI Stack

Performing the ETL operations

  1. extracting the content

  2. transforrmation(creating embeddings),

  3. load(storing the knowledge base in the vectordb)

Ask a question

Helper Function to generate response

Last updated