Control de calidad del documento
Este flujo de trabajo es un sistema diseñado para responder preguntas sobre el contenido de un documento específico guardado en Google Drive. Actúa como un asistente que puede "leer" un archivo y responder a consultas sobre su información.
+3
graph TD
%%{init: {'theme': 'mc','layout': 'elk'}}%%
ChatInput-t1dhv[<div><img src="/_astro/messages-square.BaSDmT6g.svg" style="height: 20px !important;width: 20px !important"/></div>Chat Input]
style ChatInput-t1dhv stroke:#a170ff
OpenAIModel-b5y7n[<div><img src="/_astro/openAI.BhmuxEs3.svg" style="height: 20px !important;width: 20px !important"/></div>OpenAI]
style OpenAIModel-b5y7n stroke:#a170ff
ChatOutput-eun7o[<div><img src="/_astro/messages-square.BaSDmT6g.svg" style="height: 20px !important;width: 20px !important"/></div>Chat Output]
style ChatOutput-eun7o stroke:#a170ff
GDriveFilesComponent-mgn88[<div><img src="/_astro/google_drive.wKmDsV2c.svg" style="height: 20px !important;width: 20px !important"/></div>Google Drive File Manager]
style GDriveFilesComponent-mgn88 stroke:#a170ff
ParseData-kfvde[<div><img src="/_astro/braces.Djq0PW4_.svg" style="height: 20px !important;width: 20px !important"/></div>Parse Data]
style ParseData-kfvde stroke:#a170ff
Prompt-qq08j[<div><img src="/_astro/square-terminal.BMOXc-nZ.svg" style="height: 20px !important;width: 20px !important"/></div>Prompt2]
style Prompt-qq08j stroke:#a170ff
OpenAIModel-b5y7n -.- ChatOutput-eun7o
linkStyle 0 stroke:#a170ff
GDriveFilesComponent-mgn88 -.- ParseData-kfvde
linkStyle 1 stroke:#a170ff
ParseData-kfvde -.- Prompt-qq08j
linkStyle 2 stroke:#a170ff
ChatInput-t1dhv -.- Prompt-qq08j
linkStyle 3 stroke:#a170ff
Prompt-qq08j -.- OpenAIModel-b5y7n
linkStyle 4 stroke:#a170ff
Control de calidad del documento
🧩 Overview
This workflow automates the process of answering user questions based on the content of a specific document stored in Google Drive. It functions as an intelligent assistant that can retrieve a file, process its text, and generate precise answers by providing the AI with the full document context alongside the user's query. This streamlines information retrieval and analysis from stored documents.
⚙️ Main Features
- Retrieves a specified document from Google Drive using its filename.
- Processes the raw document data into readable plain text.
- Dynamically constructs a contextual prompt by combining the user's question with the full document content.
- Generates accurate, context-aware answers using a large language model.
- Delivers the final answer directly to the user via a chat interface.
🔄 Workflow Steps
| Component Name | Role in the Workflow | Key Inputs | Key Outputs |
|---|---|---|---|
| Google Drive File Manager | Retrieves the target document from cloud storage. | Filename of the document. | Raw document data. |
| Chat Input | Captures the user's question. | User's text query. | User's question as a message. |
| Parse Data | Converts the raw document data into a plain text format. | Raw document data. | Processed, readable document text. |
| Prompt | Combines the user's question and the full document text to create a contextualized instruction for the AI. | Processed document text and the user's question. | A complete, structured prompt for the language model. |
| OpenAI Model | Generates an answer by processing the contextualized prompt. | The complete prompt containing the document and question. | A generated text response. |
| Chat Output | Presents the AI-generated answer to the user. | The generated text response. | The final answer displayed to the user. |
🧠 Notes
- The workflow requires valid credentials for both Google Drive and the OpenAI API to function.
- The accuracy of the generated answers is dependent on the quality and relevance of the source document's content.
- The system is designed to handle text-based documents; performance with complex file formats may vary.
- The model's temperature is configured for low variability, favoring consistent and deterministic responses.