yarmand / ragyva

my personal take on RAG to manage my personal notes
Apache License 2.0
0 stars 1 forks source link

ragyva

my personal take on RAG to manage my personal notes

I manage my notes in VSCode and started on a syster repo to implement a VScode extension that leverage ragyva.

install and requirements

devcontainer

lets use the devcontainer, it will install everything and will serve as base for final distribution.

start it with VSCode or run

devcontainer up --workspace-folder $(pwd)

ollama

Altertanive 1: run ollama on your machine.

Alternative 2: run Ollamma in docker-compose

docker compose up -d ollama

models

Make sure you have the models listed in config.ini. so for nomic-embed-text

ollama pull nomic-embed-text

Update the config to show whatever models you want to use. A good small model for chat is phi3:instruct

ollama pull phi3:instruct

import notes

find ./docs -name '*.md' | import.py

(see details with import.py -h)

chat with notes

chat.py

Architecture and design

Ingestion

The ingestion extract tags, links and entities to inform the creation of graphRAG communities. (see graphRAG paper)

ingestion design

(diagram source on canva)

Retrieval

The retrieval apply several RAG advanced technics. It get all chat messages in the context, rewrite the query to understand if more serach need to be done i nthe vector DB. Search result are filtered before building a final context for the reponse generation.

ingestion design

(diagram source on canva)

TODO

improve import

improve chat

improve retrieval

improve generation

Notes Agents