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

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

Đang mở
#22 3 bình luận 0 reaction 1 người được giao Được @WinterSun23 nhận Xem trên GitHub
amsoc-accepted
Ngôn ngữ chính
JavaScript
Star
1
Fork
2
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## 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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.