AnswerDotAI / AnswerDotAI/RAGatouille

output only json?

Open
#189 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4k
Forks
276
PR merge metrics
No merged PRs in 30d

Description

How to return json only in results?

from ragatouille import RAGPretrainedModel
query = ["query?"]
RAG = RAGPretrainedModel.from_index(index_path)
results = RAG.search(query,k=2)
print(results) >>>
Searcher loaded!
#> QueryTokenizer.tensorize(batch_text[0], batch_background[0], bsize) ==
#> Input: .. bla bla
*** I just want *** -->
[{'content': ... ]
is there a switch? to not get all the above gibberish?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the RAGPretrainedModel.from_index and RAG.search calls shown in the issue, then trace where their console output is produced. Done means the example returns the results while suppressing the tokenizer and model-loading messages, with no unwanted output in the terminal.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning, search
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.