Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: save rag in YAML instead of bin #848

Merged
merged 2 commits into from
Sep 8, 2024
Merged

feat: save rag in YAML instead of bin #848

merged 2 commits into from
Sep 8, 2024

Conversation

sigoden
Copy link
Owner

@sigoden sigoden commented Sep 8, 2024

BREAHK CHANGING: save rag in YAML instead of bin

Here are the reasons:

  1. Bincode cannot extend fields. In feat: support RAG-scoped rag_top_k and rag_reranker_model #847, two fields, reranker_model and top_k, were added to the RAG struct. When loading the RAG structure from the bin format, the following error occurs.
Error: Failed to load rag 'aichat-wiki' at '<aichat-config-dir>/rags/aichat-wiki.bin'

Caused by:
    tag for enum is not valid, found 32
  1. Bincode cannot handle data structures like serde_json::Value.

  2. YAML is a text format that allows users to view rag details, such as chunk content, embedding data, etc. Make it easier for us to debug or troubleshoot.

@sigoden sigoden merged commit a56d5f2 into main Sep 8, 2024
3 checks passed
@sigoden sigoden deleted the feat-rag-yaml branch September 8, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant