Indicaciones básicas (Hola, mundo)
Interacción básica entre la entrada del usuario, la plantilla de instrucción (prompt) y la respuesta de un modelo de IA.
graph TD
%%{init: {'theme': 'mc','layout': 'elk'}}%%
ChatOutput-2qvaz[<div><img src="/_astro/messages-square.BaSDmT6g.svg" style="height: 20px !important;width: 20px !important"/></div>Chat Output]
style ChatOutput-2qvaz stroke:#a170ff
GoogleGenerativeAIModel-n5twn[Google Generative AI]
style GoogleGenerativeAIModel-n5twn stroke:#a170ff
Prompt-061ik[<div><img src="/_astro/square-terminal.BMOXc-nZ.svg" style="height: 20px !important;width: 20px !important"/></div>Prompt]
style Prompt-061ik stroke:#a170ff
ChatInput-3x8pa[<div><img src="/_astro/messages-square.BaSDmT6g.svg" style="height: 20px !important;width: 20px !important"/></div>Chat Input]
style ChatInput-3x8pa stroke:#a170ff
ChatInput-3x8pa -.- Prompt-061ik
linkStyle 0 stroke:#a170ff
Prompt-061ik -.- GoogleGenerativeAIModel-n5twn
linkStyle 1 stroke:#a170ff
GoogleGenerativeAIModel-n5twn -.- ChatOutput-2qvaz
linkStyle 2 stroke:#a170ff
Indicaciones básicas (Hola, mundo)
🧩 Overview
This workflow demonstrates a fundamental AI interaction pattern, often considered a "Hello, World" example for language models. It automates the process of receiving a user's query, formatting it into a structured prompt, and generating a coherent response using a large language model. The template provides a clear, end-to-end example of how to build a simple conversational AI application.
⚙️ Main Features
- Captures user input through a chat interface.
- Dynamically constructs a prompt by inserting the user's message into a predefined template.
- Processes the prompt using a Google Generative AI model to generate a text response.
- Displays the AI-generated response back to the user in a chat format.
🔄 Workflow Steps
| Component Name | Role in the Workflow | Key Inputs | Key Outputs |
|---|---|---|---|
| Chat Input | Captures the initial message from the user. | User-provided text message. | The user's message formatted for processing. |
| Prompt | Constructs the final instruction sent to the AI model by combining a template with the user's input. | User's message. | A complete, formatted prompt ready for the model. |
| Google Generative AI Model | Generates a text-based response based on the provided prompt. | Formatted prompt from the previous step. | AI-generated text response. |
| Chat Output | Presents the final AI-generated response to the user. | AI-generated text response. | The response displayed in the chat interface. |
🧠 Notes
- The workflow is designed as an educational template to illustrate the basic flow of data in an AI-powered chat application.
- It requires a valid Google API credential to authenticate and use the Generative AI model.
- The prompt template instructs the model to respond as an expert on LLMs and AI, which defines the tone and context of all generated answers.
- The model's creativity and verbosity can be adjusted via parameters like temperature and max output tokens, though default values are used in this template.