DocsRetriever#

class scikitplot.mcp.DocsRetriever(*args, **kwargs)[source]#

Structural contract every retrieval backend must satisfy.

Implemented by the corpus+annoy adapter (_corpus_annoy.py) and by test doubles. Keeping it a typing.Protocol means backends need not import this module or subclass anything.

Methods

search(query, k)

Return up to k RetrievedChunk for query, best first.

search(query, k=5)[source]#
Parameters:
Return type:

list[RetrievedChunk]