Building a RAG Knowledge Base with Memories
This is a step-by-step walkthrough: build a memory folder, make it searchable, and query it from a Project and a Task. For the concepts behind each step — what Searchable by AI does, how indexing and propositions work, and who can read a folder — see Memories. This page stays hands-on and links back rather than re-explaining.
Walkthrough
Step 1: Set up the memory folder
- Go to Memories in the sidebar and create a new folder.
- Open the folder Settings.
- Enable Searchable by AI.
That one setting turns the folder into a searchable knowledge base — Aisle indexes every record, including any you added before enabling it. See Making a folder searchable for what happens under the hood.
Step 2: Add your documents
There are two ways to populate the folder:
| Method | Details |
|---|---|
| Upload files | Supported formats: PDF, Word, CSV. Content is extracted automatically. |
| Create manually | Write markdown content directly in the editor. |
Each document is queued for indexing immediately after saving.
Step 3: Wait for indexing
Indexing runs in the background, and each document shows a status — pending, processing, completed, or failed. Only completed documents are returned by vector search; re-save a failed one to retry. See Making a folder searchable for the full status lifecycle.
Step 4: Use the folder in a Project
Assign the folder to a Project as Reference. The model can then search the folder automatically during project chats.
If project work should save new documents into the folder, also assign it as Output.
Ask a question in the project:
Answer this using the Customer Research knowledge base: what renewal risks have we seen for Acme?
Step 5: Search the folder from a Task
Tasks can search the same folder explicitly:
question = aisle.inputs.get("question")
context = aisle.memories.vector_search(
query=question,
folder="Customer Research",
limit=5,
threshold=0.7,
)
answer = aisle.ai.raw(
f"Answer using only this context:\n\n{context}\n\nQuestion: {question}"
)
aisle.create_chat("Knowledge base answer", answer)
The query is semantic - searching for "billing problems" will match documents containing "customer charged twice" without requiring keyword overlap.
Step 6: Test it
- Ask a sample question in the Project, or run the Task with a sample question.
- Inspect the retrieved context or execution logs to review which propositions were returned and their similarity scores.
- If results are too broad, increase the similarity threshold. If too few results are returned, lower it.
Going further
- Empty results handling: In a Task, branch when
contextis empty and return a fallback response. - Multiple folders: Search separate knowledge bases from the Project or from a Task, depending on how explicit you need the retrieval logic to be.