> ## Documentation Index
> Fetch the complete documentation index at: https://docs.promptjuggler.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Knowledge Bases

> Upload documents. Get semantic search. That’s RAG, without the infrastructure.

A knowledge base is a collection of documents that PromptJuggler chunks, embeds, and indexes for semantic search. Attach a [KB Search tool](/tools/knowledge-search) to a prompt or use a [KB Search node](/workflow-nodes/knowledge-search) in a workflow, and your AI gains access to your own content at runtime. That’s <abbr title="Retrieval-Augmented Generation: a technique where the model retrieves relevant documents before generating a response">RAG</abbr>, without the infrastructure headaches.

## Supported file types

Upload any of these: `.txt`, `.csv`, `.tsv`, `.md`, `.html`, `.pdf`, `.docx`.

## How it works

Upload a document and PromptJuggler takes care of the rest: splitting it into chunks, generating embeddings, and indexing everything for fast semantic search. Each document shows a status badge that updates in real time – no need to refresh the page.

Once a document’s status shows as ready, it’s searchable. Any prompt or workflow with a KB Search tool or node can query it immediately.

## Naming

Knowledge bases use [naming](/concepts/naming-and-versioning) (with the `kb_` slug prefix) but not versioning. A knowledge base is a living collection – you add and remove documents over time rather than publishing frozen snapshots.

## Using knowledge bases

Two ways to connect a knowledge base to your AI:

* **As a tool** – attach the [KB Search tool](/tools/knowledge-search) to a prompt. The model decides when to search and what to search for. Good for conversational use cases where the model should judge when external context is needed.
* **As a workflow node** – add a [KB Search node](/workflow-nodes/knowledge-search) to a workflow. The search happens at a fixed point in the pipeline with a query you define. Good for structured pipelines where you always want context injected at a specific step.
