Cookies

With your permission, we use Google Analytics cookies to measure visits and improve the site. Necessary cookies are always on. You can change your choice or withdraw consent anytime in the footer, under Cookie settings. Cookie Policy

Skip to content

RAG and Knowledge ·Intermediate

Agentic RAG Embedding Gemma

About this app

This Streamlit app demonstrates an agentic Retrieval-Augmented Generation (RAG) Agent using Google's EmbeddingGemma for embeddings and Llama 3.2 as the language model, all running locally via Ollama.

  • Complete open-source code
  • Step-by-step tutorial
  • Runs on your computer

Technical sheet

Category
RAG and Knowledge
Difficulty
Intermediate
Models
Llama
Frameworks
Agno, Ollama (local)
Runs locally?
Yes (Ollama)
Required keys
None

License Apache-2.0 · content curated and maintained by Doutor AI.

Full tutorial

🔥 Agentic RAG with EmbeddingGemma

🎓 FREE Step-by-Step Tutorial

👉 Click here to follow our complete step-by-step tutorial and learn how to build this from scratch with detailed code walkthroughs, explanations, and best practices.

This Streamlit app demonstrates an agentic Retrieval-Augmented Generation (RAG) Agent using Google's EmbeddingGemma for embeddings and Llama 3.2 as the language model, all running locally via Ollama.

Features

  • Local AI Models: Uses EmbeddingGemma for vector embeddings and Llama 3.2 for text generation
  • PDF Knowledge Base: Dynamically add PDF URLs to build a knowledge base
  • Vector Search: Efficient similarity search using LanceDB
  • Interactive UI: Beautiful Streamlit interface for adding sources and querying
  • Streaming Responses: Real-time response generation with tool call visibility

How to Get Started?

  1. Clone the GitHub repository
git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git
cd awesome-llm-apps/rag_tutorials/agentic_rag_embedding_gemma
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Ensure Ollama is installed and running with the required models:
  • Pull the models: ollama pull embeddinggemma:latest and ollama pull llama3.2:latest
  • Start Ollama server if not running
  1. Run the Streamlit app:
streamlit run agentic_rag_embeddinggemma.py

(Note: The app file is in the root directory)

  1. Open your web browser to the URL provided (usually http://localhost:8501) to interact with the RAG agent.

How It Works?

  1. Knowledge Base Setup: Add PDF URLs in the sidebar to load and index documents.
  2. Embedding Generation: EmbeddingGemma creates vector embeddings for semantic search.
  3. Query Processing: User queries are embedded and searched against the knowledge base.
  4. Response Generation: Llama 3.2 generates answers based on retrieved context.
  5. Tool Integration: The agent uses search tools to fetch relevant information.

Requirements

  • Python 3.8+
  • Ollama installed and running
  • Required models: embeddinggemma:latest, llama3.2:latest

Technologies Used

  • Agno: Framework for building AI agents
  • Streamlit: Web app framework
  • LanceDB: Vector database
  • Ollama: Local LLM server
  • EmbeddingGemma: Google's embedding model
  • Llama 3.2: Meta's language model

From the same category

RAG and KnowledgeIntermediate

Agentic RAG with GPT-5

An agentic RAG application built with the Agno framework, featuring GPT-5 and LanceDB for efficient knowledge retrieval and question answering.

  • OpenAI
RAG and KnowledgeIntermediate

Agentic RAG with Reasoning

A sophisticated RAG system that demonstrates an AI agent's step-by-step reasoning process using Agno, Gemini and OpenAI. This implementation allows us…

  • OpenAI
  • Gemini

Need a tailor-made solution?

Not sure where to start with AI in your business? Get a free assessment and a tailored plan - no commitment.

Save hours every week with AI, no hassle

Doutor AI gives you 1,859 ready-to-copy AI prompts, by industry and in plain English - plus a complete technical library for those who want to go further.

See plans