# rag

> Self-hosted, open-source retrieval-augmented generation chat app on txtai and Streamlit: vector RAG plus graph path queries, with your own LLM.

- **Category:** RAG
- **Licence:** Apache-2.0
- **Latest version:** v0.14.0
- **Open source:** oss
- **Languages:** Python
- **Platforms:** Docker, pip
- **Tags:** Search, Machine Learning, Nlp, LLM, Rag, Gpu, Retrieval Augmented Generation, Vector Search, Knowledge Graph, AI, Python, Embeddings, Streamlit, Artificial intelligence, Txtai, Large language models, Graph Rag, Question Answering

## Description

RAG with txtai is a Retrieval Augmented Generation web app built with Streamlit and backed by the txtai framework, aimed at getting answers out of your own documents with an LLM. It supports two RAG modes: classic vector RAG, where a vector search hydrates the prompt with the top matching sections, and Graph RAG, where context comes from graph query expansion (`gq:` prefix), concept path traversals (for example linux -> macos -> microsoft windows), or a combination of both; every Graph RAG answer also renders the underlying graph. Queries beginning with `#` load a file path, URL, or raw text straight into the Embeddings index, and the DATA variable can index a local directory at startup. Behaviour is tuned through environment variables (LLM, EMBEDDINGS, CONTEXT, MAXLENGTH, TEXTBACKEND, PERSIST and others), viewable in the UI by typing `:settings`. Self-hosting uses the published neuml/rag container image on port 8501, with GPU access passed through in the examples, or a Python virtual environment installed from requirements.txt and launched via the streamlit command. The LLM can be a Hugging Face model, a local Ollama server or an OpenAI model with an API key; no user login or authentication layer is documented.

## Links

- [Homepage](https://github.com/neuml/rag)
- [Docker](neuml/rag)
- [Further reading: Introducing RAG with txtai](https://medium.com/neuml/introducing-rag-with-txtai-f3456977cf91)
- [Docker Hub](https://hub.docker.com/r/neuml/rag)

---
Source: https://selfhost.directory/project/rag