Metadata-Version: 2.5
Name: llama-index-retrievers-ragmir
Version: 6.12.0
Summary: LlamaIndex retriever for Ragmir: nodes cited to lines, pages, slides, or cells from local documents and code.
Project-URL: Homepage, https://ragmir.com
Project-URL: Documentation, https://github.com/jcode-works/jcode-ragmir/blob/main/docs/python.md
Project-URL: Repository, https://github.com/jcode-works/jcode-ragmir
Project-URL: Issues, https://github.com/jcode-works/jcode-ragmir/issues
Author-email: Jean-Baptiste Thery <jb.thery@jcode.works>
License-Expression: AGPL-3.0-only
License-File: LICENSE
Keywords: citations,llama-index,local-first,rag,ragmir,retriever
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: llama-index-core<0.15,>=0.13
Requires-Dist: ragmir==6.12.0
Description-Content-Type: text/markdown

# llama-index-retrievers-ragmir

LlamaIndex retriever for [Ragmir](https://github.com/jcode-works/jcode-ragmir): cited local
retrieval over a project's code, PDFs, Office files, and more. Every node carries its citation,
and a question the documents cannot answer returns no node.

```bash
pip install llama-index-retrievers-ragmir
```

Ragmir runs through Node.js 22.12 or later or Docker; see [`ragmir`](https://pypi.org/project/ragmir/)
to index a project from Python.

```python
from llama_index.core.query_engine import RetrieverQueryEngine
from llama_index.retrievers.ragmir import RagmirRetriever

retriever = RagmirRetriever(project_root="my-project", similarity_top_k=4)
for node in retriever.retrieve("Who approves a production release?"):
    print(node.metadata["citation"], node.text)

query_engine = RetrieverQueryEngine.from_args(retriever)
print(query_engine.query("Who approves a production release?"))
```

Node metadata holds `source`, `citation`, `context_path`, line or page ranges, `weak_evidence`, and
`source_status` when the file changed after indexing; only the citation and its context reach the
LLM prompt. Nodes keep Ragmir's ranking order without a similarity score.

Read the [Python guide](https://github.com/jcode-works/jcode-ragmir/blob/main/docs/python.md).
Open source under AGPL-3.0-only, with a commercial license available from JCode Works.
