Indicaciones de razonamiento
Este flujo genera una respuesta final con justificación. Para esto, primero crea una justificación lógica y luego la integra a la respuesta antes de enviarla.
graph TD
%%{init: {'theme': 'mc','layout': 'elk'}}%%
Prompt-vq8my[<div><img src="/_astro/square-terminal.BMOXc-nZ.svg" style="height: 20px !important;width: 20px !important"/></div>Prompt para generar justificación]
style Prompt-vq8my stroke:#a170ff
OpenAIModel-d3dpa[<div><img src="/_astro/openAI.BhmuxEs3.svg" style="height: 20px !important;width: 20px !important"/></div>Genera Justificación]
style OpenAIModel-d3dpa stroke:#a170ff
Prompt-tma9i[<div><img src="/_astro/square-terminal.BMOXc-nZ.svg" style="height: 20px !important;width: 20px !important"/></div>Prompt]
style Prompt-tma9i stroke:#a170ff
OpenAIModel-1tbks[<div><img src="/_astro/openAI.BhmuxEs3.svg" style="height: 20px !important;width: 20px !important"/></div>Genera Respuesta]
style OpenAIModel-1tbks stroke:#a170ff
ChatInput-6u0w8[<div><img src="/_astro/messages-square.BaSDmT6g.svg" style="height: 20px !important;width: 20px !important"/></div>Chat Input]
style ChatInput-6u0w8 stroke:#a170ff
CombineText-hw2cy[Combina la justificacion con la respuesta]
style CombineText-hw2cy stroke:#a170ff
ChatOutput-k57y4[<div><img src="/_astro/messages-square.BaSDmT6g.svg" style="height: 20px !important;width: 20px !important"/></div>Chat Output]
style ChatOutput-k57y4 stroke:#a170ff
Prompt-vq8my -.- OpenAIModel-d3dpa
linkStyle 0 stroke:#a170ff
OpenAIModel-d3dpa -.- Prompt-tma9i
linkStyle 1 stroke:#a170ff
Prompt-tma9i -.- OpenAIModel-1tbks
linkStyle 2 stroke:#a170ff
ChatInput-6u0w8 -.- Prompt-vq8my
linkStyle 3 stroke:#a170ff
ChatInput-6u0w8 -.- Prompt-tma9i
linkStyle 4 stroke:#a170ff
OpenAIModel-1tbks -.- CombineText-hw2cy
linkStyle 5 stroke:#a170ff
CombineText-hw2cy -.- ChatOutput-k57y4
linkStyle 6 stroke:#a170ff
OpenAIModel-d3dpa -.- CombineText-hw2cy
linkStyle 7 stroke:#a170ff
Reasoning Prompts
🧩 Overview
This workflow automates the generation of well-reasoned answers to user questions. It first creates a logical rationale for a given question and then uses that rationale to formulate a final, comprehensive answer. This structured approach is useful for educational tools, decision-support systems, or any application requiring transparent and justified AI responses.
⚙️ Main Features
- Processes a user's question to first generate a supporting rationale.
- Uses the generated rationale and the original question to produce a final answer.
- Combines the rationale and final answer into a single, coherent output for the user.
- Leverages OpenAI's language models for both reasoning and answer generation steps.
🔄 Workflow Steps
| Component Name | Role in the Workflow | Key Inputs | Key Outputs |
|---|---|---|---|
| Chat Input | Captures the initial question from the user. | User's question text. | The user's question as a message. |
| Prompt (Generate Rationale) | Formats the user's question into a specific instruction for generating a rationale. | The user's question. | A structured prompt asking an AI model to create a rationale. |
| OpenAI Model (Generate Rationale) | Generates a logical justification or reasoning based on the prompt. | The prompt for rationale generation. | A text-based rationale. |
| Prompt (Generate Final Answer) | Creates a new instruction that combines the original question and the generated rationale to request a final answer. | The user's question and the generated rationale. | A structured prompt asking for a final answer. |
| OpenAI Model (Generate Final Answer) | Produces the final answer based on the combined question and rationale. | The prompt for final answer generation. | The final answer text. |
| Combine Text | Merges the generated rationale and the final answer into a single, unified text block. | The rationale text and the final answer text. | A combined text string. |
| Chat Output | Presents the final combined output (rationale and answer) back to the user. | The combined text from the previous step. | The final message displayed to the user. |
🧠 Notes
- The workflow is designed for a sequential, two-step reasoning process: rationale generation followed by answer synthesis.
- It requires a valid OpenAI API credential to function.
- The default model for both generation steps is
gpt-4o-mini, but this can be configured. - The temperature is set low (0.1) by default to encourage more deterministic and focused outputs.
- The final output consolidates the AI's internal reasoning with its conclusion, providing transparency.