Problem
The current pipeline passes raw Google Search results directly to the LLM
for email generation. This produces low-quality leads (blog posts, listicles)
and generic-sounding emails because the LLM only has a 2-line search snippet
as context.
Proposed Solution
Introduce a multi-stage enrichment pipeline:
- Smart query rewriting — LLM rewrites user queries and selects the
right SerpApi engine (google vs google_maps) based on query intent
- Result filtering — LLM classifies results and removes non-company
pages (blogs, directories) before processing
- Website scraping — Fetch actual company websites to extract real
content for the LLM
- Improved email generation — Use full website context instead of
search snippets for personalized, higher-quality outreach
Sub-Issues
Problem
The current pipeline passes raw Google Search results directly to the LLM
for email generation. This produces low-quality leads (blog posts, listicles)
and generic-sounding emails because the LLM only has a 2-line search snippet
as context.
Proposed Solution
Introduce a multi-stage enrichment pipeline:
right SerpApi engine (
googlevsgoogle_maps) based on query intentpages (blogs, directories) before processing
content for the LLM
search snippets for personalized, higher-quality outreach
Sub-Issues