Designing an autonomous research-and-report agent
Agent architecture fundamentals.
Planner that decomposes goals, short-term scratchpad plus long-term vector memory, structured tool calls, and a reflect-retry loop for error correction.
What's really being asked
Whether you understand the standard agent loop and can justify each component rather than gesture at just use an LLM.
The full answer
PLANNING. The planner converts the research goal into an ordered set of subtasks, for example gather sources, extract claims, synthesize, draft, verify. Plan-and-execute generates the plan upfront and revises it; ReAct interleaves reasoning and acting step by step. For research, a hybrid plan-then-react works well. MEMORY. Short-term memory is the active context window plus a scratchpad of intermediate notes and the current plan state. Optional long-term storage can hold retrieved passages, deduplicated findings, and citations. When semantic retrieval fits the workload, a vector store can help the agent recall earlier evidence without overflowing the context window. TOOL USE. Expose tools as structured functions with typed arguments: web search, page fetch and parse, and a citation logger. Validate outputs and cap result size. ERROR CORRECTION. Feed every tool result, including failures, back as an observation. On a bad or empty result the agent reflects and retries with a refined query, switches tools, or re-plans. Before writing, a verification step checks that each report claim is backed by a stored source.
The mistakes people make
Stuffing everything into one prompt. No long-term memory, so the agent forgets earlier findings. Treating tool errors as fatal instead of feedback. No verification, so the report contains unsupported claims. Unbounded loops with no step or cost limit.
What usually comes next
How do you bound cost and prevent infinite loops? How does the agent decide when research is sufficient? How do you keep citations faithful? How do you handle contradictory sources?
A concrete example
Goal: report on solid-state batteries. The planner lists subtasks. The agent issues a web search; one query returns nothing, so it reflects and broadens the query. It stores retrieved abstracts in the vector memory with citations. During synthesis it queries memory for each subtopic, drafts a section, then the verifier confirms each sentence maps to a stored source, flagging one unsupported claim for a follow-up search before the final report is emitted.
Interview question
In an autonomous research agent, what is the primary reason for using an external vector store as long-term memory rather than keeping everything in the context window?
- a.Vector stores make the LLM's reasoning deterministic
- b.Context windows cannot store citations
- c.The agent can recall many prior findings via semantic retrieval without exceeding the finite context windowCorrect
- d.It removes the need for a planning module entirely
Why? this is the answer
Long research accumulates more evidence than fits in a finite context; a vector store lets the agent retrieve only relevant prior findings on demand. It does not replace planning or make reasoning deterministic.
Just read this? Test yourself on what you have been reading.
Read the original → arxiv.org
- #llm
- #agents
- #memory
- #tool-use
- #system-design
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on llm — each one lists the topics its interview covers.
See open roles