Home Explore Blog CI



ragit

1st chunk of `docs/eval.md`
e9db5575ea96f0950213091005322028e0c777da154692840000000100000224
# Evaluate RAG

## logs

The most straight-forward way is to see the logs. First, run `rag config --set dump_log true` to enable logs.

Any command that uses LLM will write a log file. The log files are found in `.ragit/logs`. You can run `rag gc --logs` to remove the logs.

## token usage

By running `rag config --set dump_api_usage true`, you can enable api usage logs. It records the token counts. You can use `rag audit` command to see how much you spent using LLMs.

## manual tfidf

With `rag tfidf` command, you can test its tfidf engine.

Title: Evaluating RAG Configuration and Usage
Summary
This section describes methods to evaluate and monitor RAG, including enabling and viewing logs, tracking token usage, and testing the tfidf engine. It provides commands to set up log dumping, view API usage, and remove logs, allowing users to understand how RAG is being utilized and optimize its performance.