retrieval-lens 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,10 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
**retrieval-lens** is an MCP server that logs every retrieval step your RAG agent makes — what chunks were retrieved, their scores, sources, and rankings — so you can audit, replay, and diff retrieval runs after the fact.
|
|
6
6
|
|
|
7
|
-
```bash
|
|
8
|
-
npx retrieval-lens
|
|
9
|
-
```
|
|
10
|
-
|
|
11
7
|
---
|
|
12
8
|
|
|
13
9
|
## The Problem
|
|
@@ -18,6 +14,22 @@ retrieval-lens fixes that. Every retrieval run is logged. Nothing is hidden.
|
|
|
18
14
|
|
|
19
15
|
---
|
|
20
16
|
|
|
17
|
+
## Demo
|
|
18
|
+
|
|
19
|
+
When your RAG agent gives a wrong answer, ask retrieval-lens what it saw:
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
await mcp.call("retrieval_diff", {
|
|
23
|
+
run_id_a: "support-bot-before-embedding-refresh",
|
|
24
|
+
run_id_b: "support-bot-after-embedding-refresh",
|
|
25
|
+
match_by: "source"
|
|
26
|
+
});
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
See docs/demo-diff.png for real output from Claude Code.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
21
33
|
## MCP Tools
|
|
22
34
|
|
|
23
35
|
| Tool | What it does |
|
|
@@ -31,17 +43,16 @@ retrieval-lens fixes that. Every retrieval run is logged. Nothing is hidden.
|
|
|
31
43
|
|
|
32
44
|
## Quickstart
|
|
33
45
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
46
|
+
Run retrieval-lens directly with npx:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npx retrieval-lens
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Add retrieval-lens to Claude Code with one command:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
claude mcp add retrieval-lens npx retrieval-lens
|
|
45
56
|
```
|
|
46
57
|
|
|
47
58
|
Then call `retrieval_observe` after every retrieval step in your RAG pipeline:
|
|
@@ -60,6 +71,18 @@ await mcp.call("retrieval_observe", {
|
|
|
60
71
|
|
|
61
72
|
---
|
|
62
73
|
|
|
74
|
+
## Adapters
|
|
75
|
+
|
|
76
|
+
### LangChain
|
|
77
|
+
|
|
78
|
+
See examples/langchain-adapter.ts
|
|
79
|
+
|
|
80
|
+
### LlamaIndex
|
|
81
|
+
|
|
82
|
+
See examples/llamaindex-adapter.ts
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
63
86
|
## Why not LangSmith / Langfuse?
|
|
64
87
|
|
|
65
88
|
Those are full observability platforms. retrieval-lens is surgical:
|
|
@@ -75,13 +98,22 @@ Those are full observability platforms. retrieval-lens is surgical:
|
|
|
75
98
|
🚧 Active development. Harness-first build using [harness engineering](https://walkinglabs.github.io/learn-harness-engineering/en/) principles.
|
|
76
99
|
|
|
77
100
|
- [x] F05 — scaffold
|
|
78
|
-
- [
|
|
79
|
-
- [
|
|
80
|
-
- [
|
|
81
|
-
- [
|
|
101
|
+
- [x] F01 — retrieval_observe
|
|
102
|
+
- [x] F02 — retrieval_query
|
|
103
|
+
- [x] F03 — retrieval_diff
|
|
104
|
+
- [x] F04 — retrieval_stats
|
|
82
105
|
|
|
83
106
|
---
|
|
84
107
|
|
|
85
108
|
## License
|
|
86
109
|
|
|
87
110
|
MIT
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Trust Stack
|
|
115
|
+
|
|
116
|
+
retrieval-lens is part of a three-layer trust stack for RAG pipelines:
|
|
117
|
+
- Portcullis — runtime MCP firewall (blocks dangerous tool calls)
|
|
118
|
+
- retrieval-lens — retrieval auditor (logs what the model saw)
|
|
119
|
+
- Dokis — output auditor (verifies claims in generated answers)
|
package/package.json
CHANGED