Preguntas y respuestas basadas en documento
El sistema extrae el contenido de un archivo fuente (como un PDF o DOCX almacenado en Google Drive), recibe como parámetro el número de preguntas deseadas, y utiliza un modelo de IA (OpenAI) para generar un cuestionario relevante con sus respuestas
graph TD
%%{init: {'theme': 'mc','layout': 'elk'}}%%
TextInput-9v0ms[<div><img src="/_astro/type.Dy26vmDy.svg" style="height: 20px !important;width: 20px !important"/></div>Text Input]
style TextInput-9v0ms stroke:#a170ff
GDriveFilesComponent-wnaii[<div><img src="/_astro/google_drive.wKmDsV2c.svg" style="height: 20px !important;width: 20px !important"/></div>Drive File Manager]
style GDriveFilesComponent-wnaii stroke:#a170ff
Prompt-knklq[<div><img src="/_astro/square-terminal.BMOXc-nZ.svg" style="height: 20px !important;width: 20px !important"/></div>Prompt]
style Prompt-knklq stroke:#a170ff
DeepseekModel-ael5s[Deepseek]
style DeepseekModel-ael5s stroke:#a170ff
TextInput-f3zh3[<div><img src="/_astro/type.Dy26vmDy.svg" style="height: 20px !important;width: 20px !important"/></div>Cantidad de preguntas a generar]
style TextInput-f3zh3 stroke:#a170ff
TextOutput-itzp7[<div><img src="/_astro/type.Dy26vmDy.svg" style="height: 20px !important;width: 20px !important"/></div>Text Output]
style TextOutput-itzp7 stroke:#a170ff
ParseData-yy97j[<div><img src="/_astro/braces.Djq0PW4_.svg" style="height: 20px !important;width: 20px !important"/></div>Extraer texto de documento]
style ParseData-yy97j stroke:#a170ff
TextInput-9v0ms -.- GDriveFilesComponent-wnaii
linkStyle 0 stroke:#a170ff
GDriveFilesComponent-wnaii -.- ParseData-yy97j
linkStyle 1 stroke:#a170ff
ParseData-yy97j -.- Prompt-knklq
linkStyle 2 stroke:#a170ff
TextInput-f3zh3 -.- Prompt-knklq
linkStyle 3 stroke:#a170ff
Prompt-knklq -.- DeepseekModel-ael5s
linkStyle 4 stroke:#a170ff
DeepseekModel-ael5s -.- TextOutput-itzp7
linkStyle 5 stroke:#a170ff
Document-Based Question and Answer Generator
🧩 Overview
This workflow automates the creation of educational quizzes by extracting text from a source document and using an AI model to generate comprehension questions. It retrieves a file from Google Drive, processes its content, and instructs a language model to produce a specified number of questions and answers based on the document's material. The final output is a structured quiz in Markdown format, ready for educational use.
⚙️ Main Features
- Automatically fetches and processes documents from Google Drive using a URL.
- Extracts and converts document content into plain text for analysis.
- Dynamically constructs a prompt for an AI model based on the document text and a user-defined number of questions.
- Generates a formatted quiz with questions and detailed answers using a DeepSeek language model.
- Presents the final quiz in a clean, readable Markdown format.
🔄 Workflow Steps
| Component Name | Role in the Workflow | Key Inputs | Key Outputs |
|---|---|---|---|
| Text Input (Document URL) | Provides the Google Drive URL for the source document. | Document URL | Document URL |
| Drive File Manager | Retrieves the specified file from Google Drive. | Document URL | File Data |
| Parse Data | Extracts and converts the raw file data into plain text. | File Data | Document Text |
| Text Input (Question Count) | Specifies the desired number of questions to generate. | Number of Questions | Number of Questions |
| Prompt | Constructs the instructional prompt for the AI, combining the document text and the question count. | Document Text, Number of Questions | Formatted AI Prompt |
| DeepSeek Model | Processes the prompt to generate the quiz content. | Formatted AI Prompt | Generated Quiz Text |
| Text Output | Displays the final generated quiz with questions and answers. | Generated Quiz Text | Final Quiz Output |
🧠 Notes
- The workflow requires valid credentials for both Google Drive and the DeepSeek API to function.
- The source document must be accessible via a shareable Google Drive link.
- The AI model is configured with a low temperature (0.1) to ensure consistent and factual output suitable for educational content.
- The output is strictly formatted in Markdown, with each question and answer pair clearly delineated.
- The system assumes the source document contains sufficient substantive content from which to generate meaningful questions.