Information about documents
In this flow, a source document is ingested and an AI agent is used to analyze its content. Based on the identified key topics and concepts, the agent uses a web search tool to find relevant external resources
graph TD
%%{init: {'theme': 'mc','layout': 'elk'}}%%
ParseData-sqlix[<div><img alt="logo" src="/_astro/braces.Djq0PW4_.svg" style="height: 20px !important;width: 20px !important"/></div>Obtener Texto]
style ParseData-sqlix stroke:#a170ff
AdvancedAgent-krlv0[Agent2]
style AdvancedAgent-krlv0 stroke:#a170ff
GoogleGenerativeAIModel-0mubo[Gemini]
style GoogleGenerativeAIModel-0mubo stroke:#a170ff
SearXng-5tzhk[Web Search SearXng]
style SearXng-5tzhk stroke:#a170ff
GDriveFilesComponent-rkwzv[<div><img alt="logo" src="/_astro/google_drive.wKmDsV2c.svg" style="height: 20px !important;width: 20px !important"/></div>Drive File Manager]
style GDriveFilesComponent-rkwzv stroke:#a170ff
TextInput-uane6[<div><img alt="logo" src="/_astro/type.Dy26vmDy.svg" style="height: 20px !important;width: 20px !important"/></div>URL del documento]
style TextInput-uane6 stroke:#a170ff
TextOutput-4fn4w[<div><img alt="logo" src="/_astro/type.Dy26vmDy.svg" style="height: 20px !important;width: 20px !important"/></div>Text Output]
style TextOutput-4fn4w stroke:#a170ff
ParseData-sqlix -.- AdvancedAgent-krlv0
linkStyle 0 stroke:#a170ff
GoogleGenerativeAIModel-0mubo -.- AdvancedAgent-krlv0
linkStyle 1 stroke:#a170ff
SearXng-5tzhk -.- AdvancedAgent-krlv0
linkStyle 2 stroke:#a170ff
GDriveFilesComponent-rkwzv -.- ParseData-sqlix
linkStyle 3 stroke:#a170ff
TextInput-uane6 -.- GDriveFilesComponent-rkwzv
linkStyle 4 stroke:#a170ff
AdvancedAgent-krlv0 -.- TextOutput-4fn4w
linkStyle 5 stroke:#a170ff
Information about Documents
The workflow retrieves a document from Google Drive, extracts its text, and then employs an AI agent to identify key topics and search the web for related pages. The agent produces a concise list of web‑page suggestions, which is displayed to the user.
Main Features
- Retrieves a file from Google Drive using a provided URL.
- Converts the file into plain text, supporting multiple document formats.
- Uses a Gemini language model to understand the content and decide on relevant search queries.
- Leverages a SearXng web‑search tool to fetch up‑to‑date results.
- Returns a structured list of recommended web pages with links.
Workflow Steps
| Component Name | Role in the Workflow | Key Inputs | Key Outputs |
|---|---|---|---|
| URL del documento | Collects the Google Drive URL from the user. | Text (URL) | Message |
| Drive File Manager | Downloads the file identified by the URL. | File Url | Data (file content) |
| Parse Data | Extracts plain text from the file content. | Data | Text (plain text) |
| Agent | Receives the extracted text, queries Gemini, and uses the Web Search tool to produce a list of related web pages. | Input text, Gemini model, Web Search tool | Message (list of web‑page suggestions) |
| Text Output | Displays the agent’s response to the user. | Message | None (UI output) |
Notes
- The workflow expects a valid Google Drive file URL; otherwise the Drive File Manager will return an error.
- Gemini (Google Generative AI) is configured with a maximum token limit of 4096 and no streaming; adjust settings if longer responses are required.
- The Agent is limited to 35 iterations; if the response is incomplete, consider increasing this limit.
- The system prompt instructs the agent to “propose several web pages (including links) to help me understand the content of the text,” ensuring a focused search.
- The Web Search tool uses the SearXng instance and returns up to 30 results per query; this can be modified by changing the
max_resultsparameter. - All components are designed for sequential execution; parallelism can be enabled by adjusting the
parallel_executionsparameter in batch mode.