All examples

Example 11

Experiment

AI Knowledge Base

A library of reference documents your AI can consult before it answers.

A knowledge base is a set of large, stable documents that should be read, not guessed. Keep the documents, describe them, let a schedule bring in new ones, choose the model that understands them, and control who may consult them.

Chapter one

When a document joins the library

A reference document is kept as it came, described, turned into something the AI can search by meaning, and then placed in the library to be consulted.

  1. 1
    File Server

    The original document is kept

    The File engine holds the document exactly as it was entered, so there is always an original to go back to.

  2. 2
    Document Database

    The document is described

    The Data engine stores the metadata of the document, such as what it is, where it came from, and when it arrived.

  3. 3
    LLM Plane

    An embedding model is chosen

    The LLM engine selects the embedding model that turns the document into the embeddings the library searches by.

  4. 4
    RAG

    The document is stored for reference

    The RAG engine stores the large, immutable document so it can be consulted whenever the AI needs a reference instead of a guess.

Chapter two

When the library has to stay current and protected

A knowledge base is only useful if it keeps growing and only the right people can read from it. Two blocks take care of both.

A library is never finished

New documents keep arriving, and not every document is meant for every reader.

  • On a schedule

    New documents are brought in

    The Cron engine synchronizes new documents into the RAG on a schedule, so the library stays up to date without anyone uploading by hand.

  • By permission

    Who consults what

    The Authorization engine determines who gets to consult which parts of the RAG, so each person only gets answers from the documents they are allowed to read.

Make it yours

Variations worth trying

  • Begin with a folder of documents and a manual upload before automating the sync.
  • Run separate knowledge bases per team when documents should not mix.
  • Try two embedding models on the same documents and compare answers.

Starting point

Ask your coding agent for your version

Use this prompt as a starting point, then change whatever does not fit your idea.

Build an AI knowledge base that stores reference documents, describes them with metadata, syncs new ones on a schedule, and controls who can consult them.

Use these Ultrahost building blocks, in this flow.

When a document joins the library:
1. File Server: The File engine holds the document exactly as it was entered, so there is always an original to go back to.
2. Document Database: The Data engine stores the metadata of the document, such as what it is, where it came from, and when it arrived.
3. LLM Plane: The LLM engine selects the embedding model that turns the document into the embeddings the library searches by.
4. RAG: The RAG engine stores the large, immutable document so it can be consulted whenever the AI needs a reference instead of a guess.

When the library has to stay current and protected:
- On a schedule (Cron): The Cron engine synchronizes new documents into the RAG on a schedule, so the library stays up to date without anyone uploading by hand.
- By permission (Authorization Layer): The Authorization engine determines who gets to consult which parts of the RAG, so each person only gets answers from the documents they are allowed to read.

Treat this as a starting point. Keep the parts that fit my idea and adapt the rest.

Next example

Persistent Agent Memory