Evolutionary-Algorithms-On-Click / Evolutionary-Algorithms-On-Click/user_docs

refactor: Implement RAG Pipeline for AI Chatbot to Replace Full-Context Injection

Ouverte
#22 3 commentaires 0 réactions 1 personne assignée Réclamée par @WinterSun23 Voir sur GitHub
amsoc-accepted
Langage dominant
JavaScript
Étoiles
1
Forks
2
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

## Overview

The chatbot currently injects the full documentation into the system prompt using `INCLUDE_DOCS_CONTEXT`. This works for testing, but it’s inefficient, slow, and wastes tokens.

## Goal

Replace full-doc injection with a RAG setup to reduce tokens and improve response time.

## Plan

- Parse all `.md` files from `user_docs`
- Split content into logical chunks
- Generate embeddings per chunk
- Store them in a simple local vector index
- On each query:
- Run semantic search
- Fetch top 3–5 relevant chunks
- Inject only those into the prompt

## Acceptance

- `INCLUDE_DOCS_CONTEXT` is removed or rerouted to RAG
- Token usage drops noticeably
- Project-specific answers still work

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.