Skip to content

API Reference parrot.knowledge.wiki.experience.reducer

github-actions[bot] edited this page Dec 2, 2026 · 1 revision

parrot.knowledge.wiki.experience.reducer

View source

Pure reduction and deterministic matching for experience lessons.

Alias ExperienceConfig

Re-exported from parrot.knowledge.wiki.experience.models.ExperienceConfig.

Alias ExperienceEvent

Re-exported from parrot.knowledge.wiki.experience.models.ExperienceEvent.

Alias Lesson

Re-exported from parrot.knowledge.wiki.experience.models.Lesson.

Function match_score

Return the deterministic trigger-family similarity for a failure.

match_score(lesson: Lesson, executable: str, subcommand: str, error: str) -> float

Parameter Type Default Description
lesson Lesson The reduced lesson to compare.
executable str The failure's executable basename.
subcommand str The failure's command family.
error str The failure's error text.

Returns: float — Zero for another command family, one for an exact normalized error, otherwise the Jaccard similarity of normalized error tokens.

Function reduce_events

Derive lessons from a set of events.

Events are de-duplicated by their immutable event identity before their evidence is grouped by lesson and solution revision. The returned mapping is deterministic for every ordering of the same event set.

reduce_events(events: Iterable[ExperienceEvent], config: ExperienceConfig) -> dict[str, Lesson]

Parameter Type Default Description
events Iterable[ExperienceEvent] Validated events from the repository, global, and shared logs.
config ExperienceConfig Thresholds used for confirmation and quarantine.

Returns: dict[str, Lesson] — The derived lesson for every lesson that has a valid recording event.

Alias signature_similarity

Re-exported from parrot.knowledge.wiki.experience.fastpath.signature_similarity.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally