AI
Ask AI
Overview:
The Ask AI
block allows users to interact with a large language model (LLM) through various prompts, including inquiries and actions such as summarization, idea generation, or reasoning. It effectively handles additional context to improve response relevance and offers structured outputs through predefined functions like OpenAI Functions or JSON mode.
Inputs & Outputs
I/O | Feature | Type | Simple Explanation |
---|---|---|---|
input | question | string | The main inquiry you want to present to the LLM. Clear and detailed questions lead to more accurate responses. |
input | context | string | Background details related to your question that improve the specificity of the response. |
input | function | string | Enables the provision of OpenAI functions for models in the GPT family; these can be defined easily using the Define OpenAI Function block. |
input | model | selector | The specific LLM model that will generate an inference based on your inputs. |
input | json_mode | boolean | Activating this ensures the AI’s output is formatted strictly in JSON format when responding. |
input | cache_response | boolean | Enabling this feature allows repeated responses without additional AI calls if inputs remain unchanged, optimizing performance. |
output | response | string | The LLM’s response, formatted as a string if json_mode is enabled. |
Use Cases
Consider how this block could be utilized effectively:
- Generating Data: Imagine you’re drafting a report but lack certain pieces of information; by asking specific questions within given contexts, you can fill those gaps efficiently.
- Enhancing Responses: When dealing with complex queries that require deeper insights, providing context helps shape a more complete and relevant answer from the LLM.
- Function-Specific Responses: If you need tailored outputs like data structuring (e.g., as JSON), guiding the interaction toward a particular function ensures clarity and purpose in communication.
In essence, whenever there’s a need for dynamic interactions with language models while maximizing output relevance and utility, the Ask AI
block is an essential tool!
Was this page helpful?