Skip to content

API Reference parrot_tools.scraping.recall_processor

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_tools.scraping.recall_processor

View source

RecallProcessor — Post-extraction LLM recall for rag_text generation and gap-filling.

After mechanical extraction has produced a list of ExtractedEntity objects, RecallProcessor makes a single LLM call to:

  1. Generate natural language rag_text for each entity
  2. Fill missing field values from original page content
  3. (Optionally flag potentially missed entities — logged, not surfaced)

Alias ExtractedEntity

Re-exported from parrot_tools.scraping.extraction_models.ExtractedEntity.

Alias ExtractionPlan

Re-exported from parrot_tools.scraping.extraction_models.ExtractionPlan.

Attribute RECALL_PROMPT

Class RecallProcessor

Post-extraction LLM recall for rag_text generation and gap-filling.

Makes a single LLM call after mechanical extraction to:

  1. Generate natural language rag_text for each entity
  2. Fill missing field values from original page content
  3. Flag potentially missed entities (logged at WARNING level)

If the LLM call or response parsing fails, the original entities are returned unchanged so the pipeline can continue gracefully.

The LLM client must support async def complete(prompt: str) -> str.

Parameter Type Default Description
llm_client Any Any object with an async complete(prompt) method.

Method RecallProcessor.recall

Enrich extracted entities with rag_text and gap-filling.

recall(entities: List[ExtractedEntity], page_html: str, extraction_plan: ExtractionPlan, url: str) -> List[ExtractedEntity]

Parameter Type Default Description
entities List[ExtractedEntity] List of extracted entities from mechanical extraction.
page_html str Raw HTML of the source page.
extraction_plan ExtractionPlan The ExtractionPlan used for extraction.
url str Source URL (used for logging).

Returns: List[ExtractedEntity] — Enriched list of ExtractedEntity with rag_text populated. Returns the original list on LLM/parse failure.

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