Skip to content

Latest commit

 

History

51 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-platform search and analysis service

Start Image

Team Users solution for the Digital Breakthrough international hackathon, built for Media Wise. An intelligent search service reachable from both a web interface and a Telegram Web App, so the knowledge base is available from any device. It handles text, images and tables, and finds precise answers inside large document collections.

Key features

Broad file and media support. Works with .txt, .pdf, .html, .mhtml and .xlsx, covering text, images and tables so nothing in a document is out of reach.

Complex queries and a graph knowledge representation. Uses RAG, GraphRAG, NanoGraphRAG and LightRAG (state of the art as of 10 Nov 2024) to handle non-linear queries and still surface relevant data. Every result comes with a graph of its relationships, which makes the system's reasoning transparent.

Interactive review and two modes. Relevant document fragments are displayed directly in the interface. "On the fly" mode is for fast lookup; "Final edition" mode is for precise answers.

Built on open-source components — Llama 3.2 Vision and the Kotaemon library — plus a fine-tuned e5-large embedder for retrieval accuracy.

Key metrics

Metric Description Value
Search latency Time to return search results < 2 s
RAGAS answer relevancy Accuracy and relevance of retrieved data 0.96

Quick start

  1. Clone the repository
    git clone https://github.com/Baltsat/Users-knowledge-search.git
  2. Install dependencies. Python 3.10+ required.
    pip install -r requirements.txt
  3. Configure the Telegram bot. Register a bot via BotFather, then export the token:
    export TELEGRAM_TOKEN="your-telegram-bot-token"
  4. Run the bot
    python bot.py

Workflow

Search with direct links. Users type queries straight into the Telegram bot. Each query returns a list of relevant documents with direct links, so the source is one tap away.

Adding documents. Upload files directly in the Telegram chat and the knowledge base stays current.

Tracking and engagement. The system tracks response latency, relevance and user activity, with a leaderboard for light competition.

API

The bot uses a FastAPI REST API to serve database queries.

Endpoints

  1. /api/searchGET: retrieve documents for a query; every result carries a direct link to the document.
  2. /api/uploadPOST: add a new document to the database.

Document structure

  • title — document or presentation title
  • type — file type (text, presentation, …)
  • upload_date — upload date
  • tags — keywords that improve search relevance

Example requests

GET  http://localhost:8000/api/search?query=campaign+strategy
POST http://localhost:8000/api/upload

Running the full service

  1. Clone the repository.
  2. Create and activate a virtual environment.
  3. pip install -r requirements.txt
  4. python manage.py migrate
  5. python manage.py runserver

Team

Name Role Contact
Konstantin Baltsat Product and ML t.me/BALTSAT
Igor Din Full stack t.me/ig_din
Kirill Sakhnevich ML and backend t.me/SakhnevichKirill
Artem Sosedka ML and MLOps t.me/sostema

About

Multi-platform document search over RAG, GraphRAG, NanoGraphRAG and LightRAG with a Telegram Web App. RAGAS answer relevancy 0.96. Digital Breakthrough international hackathon.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages