Skip to content

Fyvel/local-rag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

A Journey to Local RAG

Based on LangChain framework
state-of-the-art rag_detail

Roadmap

✅ - AI Chat App running on local network
✅ - File upload
✅ - Web Search
❌ - Indexing local files
❌ - RAG Orchestrator

0 - Prerequisites installation

ollama pull deepseek-r1:14b # reasoning model
ollama pull mistral:latest # general purpose

1 - Setup a UI

Here's a sample of the final result: alt text

Setup docker

# Pull the latest image
docker pull ghcr.io/open-webui/open-webui:main

# Volume to persist data
docker volume create open-webui-data

# Run the container
docker run -d -p 6969:8080 \
	-v open-webui-data:/app/backend/data \
	--name open-webui \
	ghcr.io/open-webui/open-webui:main

Health check

# Check container status
docker ps

# Get your IP
ipconfig getifaddr en0

Visit http://<your_ip>:6969 (or http://localhost:6969) in your browser.

Note:
On first run, you will be prompted to create an admin account. Other user accounts can be created later on.

Adjust the settings

Set system prompt

Go to Settings > General > System Prompt and set it to your liking.

You are the most efficient AI Assistant that answers following these principles:

- Casual, straight-to-the-point responses.
- Prioritise IT best practices and performance.
- Provide trade-offs when applicable.
- Fact-check and provide sources when needed.

Advanced parameters

Go to Settings > Advanced and set the following parameters:
so it knows how many R are in strawberry

Mirostat: 0 # no randomness
Top K: 10 # choose within the top 10 tokens
Frequency Penalty: 1 # no recall/repeat
Max tokens (num_predict): 4096 # to be safe

Enable Web Search

Note:
We are using Google Search Engine here, but other search engines are available. Full documentation is available here

  1. Create a Google Custom Search Engine
  2. Grab the Search Engine ID created
  3. Get the API Key from Custom Search JSON API

Go to Settings > Admin settings > Web Search
Set the Web Search Engine to be google_pse and fill in the API Key and Search Engine ID.

Search Result Count: 5
Concurrent Requests: 6

About

A journey to build a local RAG

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors