Level 1 - Simple RAG

In this notebook we will be using Llama Stack to run a simple RAG example.

Focus

Building a simple RAG application using Llama Stack to understand the fundamentals of document retrieval and question answering.

Learning Objective

Understand the core mechanics of RAG and Vector Databases in LlamaStack.

  • Vector Database Interaction: How to connect to a vector database, insert documents and submit queries.

  • Retrieval Mechanism: How LlamaStack identifies and extracts relevant information.

  • Basic Question Answering: Using retrieved content in conjunction with inference to generate dataset specific answers.

Task Example

Users will work with a vector database to index documents and perform semantic searches to answer questions using retrieved context.

Expected Agent Behavior

The system should retrieve relevant documents from the vector database and use them to provide accurate, contextual answers to user queries.

Key Concepts Demonstrated

  • Vector database operations and document indexing

  • Semantic search and retrieval mechanisms

  • Basic RAG architecture and workflow

  • Integration of retrieval and generation components

Run Notebook 1

To run this notebook, please select Level1_simple_RAG.ipynb from the file browser.

Level 1 - Simple RAG

To execute the notebook cells, navigate to the top toolbar. Click the fast-forward (⏩) icon to restart the kernel and execute all cells sequentially from top to bottom. Alternatively, you can click the play (▶️) icon to run individual cells one at a time. If you need to restart the kernel, you can do so by clicking the (🔄) icon.

Run Notebook