Commit 28a0fe5
fix: Update rag examples to use fresh faiss index every time (llamastack#998)
# What does this PR do?
In several examples we use the same faiss index , which means running it
multiple times fills up the index with duplicates which eventually
degrades the model performance on RAG as multiple copies of the same
irrelevant chunks might be picked up several times.
Fix is to ensure we create a new index each time.
Resolves issue in this discussion -
llamastack#995
## Test Plan
Re-ran the getting started guide multiple times to see the same output
Co-authored-by: Hardik Shah <hjshah@fb.com>1 parent 06e5af1 commit 28a0fe5
File tree
3 files changed
+9
-7
lines changed- docs
- source/getting_started
- tests/client-sdk/agents
3 files changed
+9
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
691 | 691 | | |
692 | 692 | | |
693 | 693 | | |
694 | | - | |
| 694 | + | |
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
| |||
1656 | 1656 | | |
1657 | 1657 | | |
1658 | 1658 | | |
| 1659 | + | |
1659 | 1660 | | |
1660 | 1661 | | |
1661 | 1662 | | |
| |||
1673 | 1674 | | |
1674 | 1675 | | |
1675 | 1676 | | |
1676 | | - | |
| 1677 | + | |
1677 | 1678 | | |
1678 | 1679 | | |
1679 | 1680 | | |
| |||
3098 | 3099 | | |
3099 | 3100 | | |
3100 | 3101 | | |
3101 | | - | |
| 3102 | + | |
3102 | 3103 | | |
3103 | 3104 | | |
3104 | 3105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
| |||
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
217 | | - | |
| 218 | + | |
218 | 219 | | |
219 | 220 | | |
220 | 221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
| 417 | + | |
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
| |||
0 commit comments