MCPcopy
hub / github.com/daveebbelaar/ai-cookbook / show

Function show

knowledge/hybrid-retrieval/4-rrf.py:61–65  ·  view source on GitHub ↗
(label: str, results: list[tuple[str, float]])

Source from the content-addressed store, hash-verified

59
60
61def show(label: str, results: list[tuple[str, float]]) -> None:
62 print(f"\n{label}")
63 for i, (doc_id, score) in enumerate(results[:5], 1):
64 text = corpus.loc[corpus["_id"] == doc_id, "text"].iloc[0]
65 print(f" {i}. [{score:.4f}] {doc_id} {text[:70]}")
66
67
68if __name__ == "__main__":

Callers 1

4-rrf.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected