# Skill: Use Exa neural search and iterative retrieval to fact-check before answering > Lets an AI coding/research agent verify fresh facts and find current code examples by searching the live internet with Exa before responding -- applies whenever the answer involves prices, library versions, recent events, or any fact that postdates the model's training cutoff. Source: sodigi·learn -- vibecoding/umnyy-poisk-dlya-agenta · https://sodigi.io/learn/vibecoding/umnyy-poisk-dlya-agenta ## When to use - User asks about current prices, current library versions, recent news, or anything that may have changed since the model's training cutoff. - User needs a working code example for a library that could have been updated. - User asks the agent to "check online first" or "verify this." - User has been burned by the agent confidently providing outdated or invented data. ## Core rules - A bare model's knowledge is frozen at training time. For anything newer, it must search -- or it will invent with confidence. - Use the **right tool for the right job**: `web_search_exa` for facts, news, prices, companies, and people; `get_code_context_exa` for code examples, library docs, and Stack Overflow answers. Searching for code with general web search returns opinion articles, not working examples. - Iterative search is a **loop of at most 3 rounds**: (1) broad query to see what exists, (2) assess what was found, (3) refine query using terminology spotted in results, (4) search again with precision. Stop after 3 rounds even if not perfect -- work with what you have. - Prefer **3 precise, relevant sources** over 20 vague ones. Quality beats quantity. - Every answer that relies on search must include **source links**. No links = no verification. - Do not trust a single source for a factual claim. Cross-check with 2-3 sources. - State honestly when a fact could not be found rather than filling the gap with a plausible invention. ## Procedure 1. Identify whether the user's request contains facts that may be outdated or unknown to the model (prices, versions, recent events, current code). 2. Announce: "I will search online before answering." 3. Run `web_search_exa` with a broad query to orient. Review the top results. 4. If the query returned off-target results, identify better terminology from what was found, then run a more precise query. Repeat up to 3 rounds total. 5. For code needs, run `get_code_context_exa` to retrieve actual working code, not overview articles. 6. Cross-check key claims across 2-3 sources. 7. Compose the answer, citing the sources used. Flag any item that could not be verified. ## Ready-to-use prompt ``` Before you answer, search online for the facts I need: 1. Use web search to find [current prices / version / event] for this year. Check 2-3 sources and note where they agree or disagree. 2. Use code search to find a recent, working example of [the specific library or API]. Return actual code, not overview articles. 3. If the first search returns off-topic results, refine your query using words you found in those results and search again. Maximum 3 rounds. 4. In your answer, state which sources you used. If you could not find something, say so -- do not make it up. ``` ## Pitfalls - Trusting the model's built-in knowledge for current prices, library versions, or recent news -- it will confidently invent plausible but wrong answers. - Using general web search for code examples -- you get "10 tips" articles, not working code; use code-specific search for code. - Stopping after one search query -- the first query is almost always a rough draft; refine and search again. - Collecting 20 vague sources instead of 3 precise ones -- more pages does not mean better information. - Letting the agent search indefinitely with no round cap -- it will burn tokens chasing perfection. - Accepting an answer with no source links -- if there are no links, there is no way to verify the information.