> For the complete documentation index, see [llms.txt](https://docs.darwinslab.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.darwinslab.ai/agent-architecture-and-evaluator-dynamics/retrieval-and-web-search-augmentation.md).

# Retrieval & Web-Search Augmentation

When the nature of a task demands current knowledge, the agent has the capability to activate an optional web-retrieval module. This can involve accessing sources like the Bing API, SerpAPI, or an internal Retrieval-Augmented Generation (RAG) store. By engaging these resources, the agent retrieves the most recent and relevant snippets of information.

These retrieved snippets are then seamlessly streamed back into the active prompt.

This integration enriches the ongoing task by anchoring reasoning processes in a fresh and accurate context.

This updated context supports subsequent stages of mutation or evaluation, which may be required during the task execution.

The integration of real-time, relevant data ensures that all actions and decisions taken by the agent are not only informed by current trends and information but are also flexible to adapt as new data becomes available. This capability significantly enhances the efficacy and reliability of the task outcomes by providing a dynamic framework for decision-making, ultimately leading to more robust and contextually grounded results.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.darwinslab.ai/agent-architecture-and-evaluator-dynamics/retrieval-and-web-search-augmentation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
