ExecutionResult#

class scikitplot.corpus.ExecutionResult(hits, stages, queries, responses, passages=None, query=None, status=None)[source]#

Ranked hits plus the account of every stage.

Parameters:
hitstuple of PlannedHit

Final ranking, best first, at most the plan’s top_k.

stagestuple of StageOutcome

One per stage, in execution order.

queriestuple of str

The queries retrieve was asked to run, the original first unless the transform dropped it.

responsestuple

index.search’s response for each query, aligned with queries; None where the query was not started (a budget) or its search or embedding raised (see the retrieve stage’s error).

passagestuple of ContextPassage or None, default=None

The compressed context, when compress ran.

querystr or None, default=None

The query the plan was run with.

statusRetrievalStatus or None, default=None

Leave None: it is derived (see _derive_status).

Parameters:

Notes

User. Like a RetrievalResponse, this iterates, indexes and lens like its hits, so code that consumed a response consumes a plan’s result.

error_records()[source]#

Return every diagnostic: the stages’ first, then the responses’.

Return type:

list[ErrorRecord]

hits: tuple[PlannedHit, ...][source]#
passages: tuple[ContextPassage, ...] | None = None#
queries: tuple[str, ...][source]#
query: str | None = None#
responses: tuple[Any, ...][source]#
stage(kind)[source]#

Return the outcome of one stage.

Parameters:

kind (StageKind | str)

Return type:

StageOutcome | None

stages: tuple[StageOutcome, ...][source]#
status: RetrievalStatus | None = None#
to_dict()[source]#

Return a JSON-compatible mapping of the outcome (not the hits).

Return type:

dict[str, Any]