# Local RAG Pipeline

> Build a local RAG pipeline, connect it to live CVE data, test retrieval poisoning, apply it to SOC alerts, and improve exact-match retrieval with hybrid search.

- Source: https://stevenfoerster.com/tutorials/paths/local-rag/

Learning Path

Build a local RAG pipeline, connect it to live CVE data, test retrieval poisoning, apply it to SOC alerts, and improve exact-match retrieval with hybrid search.

8 available [Start the path](https://stevenfoerster.com/tutorials/build-a-local-rag-pipeline-with-ollama-and-chromadb/)

1.  - 1
    - intermediate

    ## [Build a Local RAG Pipeline with Ollama and ChromaDB](https://stevenfoerster.com/tutorials/build-a-local-rag-pipeline-with-ollama-and-chromadb/)

    A hands-on guide to building a retrieval-augmented generation pipeline that runs entirely on your machine, using security advisories as the knowledge base.

2.  - 2
    - intermediate

    ## [Add a Chat Interface to Your Local RAG Pipeline](https://stevenfoerster.com/tutorials/add-a-chat-interface-to-your-local-rag-pipeline/)

    Wrap your local RAG pipeline in a Streamlit chat UI with conversation history, streaming responses, and source citations that show where every answer came from.

3.  - 3
    - intermediate

    ## [Local RAG with PDF Documents](https://stevenfoerster.com/tutorials/local-rag-with-pdf-documents/)

    Parse PDFs, handle tables and layout-aware chunking, extract metadata, and feed structured content into your local RAG pipeline.

4.  - 4
    - intermediate

    ## [Connect Your RAG Pipeline to Live CVE Feeds](https://stevenfoerster.com/tutorials/connect-your-rag-pipeline-to-live-cve-feeds/)

    Pull from the NVD API and OSV.dev, implement incremental ingestion, and add metadata filtering to your local RAG pipeline.

5.  - 5
    - intermediate

    ## [RAG Poisoning: How Adversarial Documents Break Retrieval Pipelines](https://stevenfoerster.com/tutorials/rag-poisoning-how-adversarial-documents-break-retrieval-pipelines/)

    Understand how hidden instructions, topic hijacking, and authority impersonation attacks break RAG pipelines, and build defenses against them.

6.  - 6
    - intermediate

    ## [Run a Private AI Assistant in Your SOC](https://stevenfoerster.com/tutorials/run-a-private-ai-assistant-in-your-soc/)

    Build a RAG pipeline over Wazuh alerts that helps analysts triage incidents without sending data to external services.

7.  - 7
    - intermediate

    ## [Evaluating RAG Pipelines with RAGAS and TruLens](https://stevenfoerster.com/tutorials/evaluating-rag-pipelines-with-ragas-and-trulens/)

    Build an eval set and measure faithfulness, context precision, context recall, and answer relevancy with RAGAS and TruLens to know if changes actually help.

8.  - 8
    - intermediate

    ## [Hybrid Search and Reranking for Local RAG](https://stevenfoerster.com/tutorials/hybrid-search-and-reranking-for-rag/)

    Pair BM25 keyword retrieval with dense embedding search via Reciprocal Rank Fusion, then rerank with a cross-encoder to improve recall on rare terms.


[All tutorials and learning paths](https://stevenfoerster.com/tutorials/)
