Lens

Research Flow

Understand the lifecycle of a research query from initial ask to synthesized insight.

The 4-Stage Lifecycle

Every query in Lens follows a predictable, modular path. This separation of concerns allows for high reliability and easy debugging.

1. Orchestration

The engine parses your query and determines which collectors are best suited to find the answer. It initializes connections and checks rate limits.

2. Collection

Collectors run in parallel. They fetch data from APIs (arXiv, GitHub, etc.) and convert the raw responses into the standard internal Lens schema.

3. Synthesis (Pipelines)

Data moves through a series of pipelines. Here, it is deduplicated, cleaned, and summarized by LLMs or algorithmic processors.

4. Output Rendering

The final synthesized information is formatted according to your configuration (e.g., a Markdown report or a JSON stream for an API).

Parallel Execution

Lens is designed for speed. Collectors run concurrently, meaning the time to research 5 sources is often the same as researching one, provided you aren't bottlenecked by CPU or API rate limits.

Visualizing the Flow

[0.0s] QUERY_INIT "quantizing LLMs"
[0.2s] ORCHESTRATOR_DISPATCH → arxiv, github, wikipedia
[1.5s] COLLECTOR_SUCCESS wikipedia (2 results)
[2.1s] COLLECTOR_SUCCESS arxiv (12 results)
[3.5s] PIPELINE_START deduplicating 14 items...
[5.0s] SYNTHESIS_COMPLETE report generated in dist/