# BM25 workflow

Inspect a lexical baseline without a model, API key or network calls.

CLI version: 0.2.1 · [Read online](<https://ragvidence.medo-id.com/docs/bm25-workflow>)

## Run on a file or folder

**Terminal**

```
ragvi bm25 ./manual.txt --query "How do I reset the device?"
ragvi bm25 ./docs --questions ./questions.txt --format html --format json
```

BM25 is useful for identifiers, names and domain terms. It requires no LLM and no semantic runtime. Scores are ranking observations, not correctness probabilities.

## Compare structural alternatives

**Terminal**

```
ragvi compare-data ./docs --questions ./questions.txt --techniques bm25,parent-child
ragvi heading-context ./manual.md --query "Reset procedure"
```

Parent-child searches smaller children and returns full originals: a document, HTML section, record or PDF page. It may restore conditions while using more context. heading-context indexes authentic heading paths and fails on wholly flat input.

## Chunk settings

Default passages have at most 500 body characters with 50 overlap. --chunk-size and --chunk-overlap use characters; overlap must be smaller than size. Markdown overlap stays within sections. Recursive splitting and ATX heading structure are supported; these are not arbitrary language parsers.

- [Portable technique reference](<https://github.com/Medo-ID/ragvidence/blob/v0.2.1/docs/portable-techniques.md>)
