openai

OpenAI

Gain access to OpenAI models for text generation, speech synthesis, audio transcription, and image generation.

Model to use for content generation

Reasoning effort level to use for models that support reasoning. Specifying "none" will indicate the LLM to not use reasoning (for models that support optional reasoning). A "dynamic" effort will indicate the provider to automatically determine the reasoning effort (if supported by the provider). If not provided the model will not use reasoning for models with optional reasoning or use the default reasoning effort specified by the provider for reasoning-only models.
Note: A higher reasoning effort will incur in higher output token charges from the LLM provider.

Optional system prompt to guide the model

Some LLMs may generate invalid JSON for a tool call, so this will be `null` when it happens.

Required if `type` is "tool_calls"

Required if `type` is "tool_result"

Indicates the MIME type of the content. If not provided it will be detected from the content-type header of the provided URL.

Required if part type is "text"

Required if part type is "image"

Required unless `type` is "tool_call". If `type` is "multipart", this field must be an array of content objects. If `type` is "tool_result" then this field should be the result of the tool call (a plain string or a JSON-encoded array or object). If `type` is "tool_call" then the `toolCalls` field should be used instead.

Array of messages for the model to process

Response format expected from the model. If "json_object" is chosen, you must instruct the model to generate JSON either via the system prompt or a user message.

Maximum number of tokens allowed in the generated response

Sampling temperature for the model. Higher values result in more random outputs.

Top-p sampling parameter. Limits sampling to the smallest set of tokens with a cumulative probability above the threshold.

Sequences where the model should stop generating further tokens.

Function name

JSON schema of the function arguments

Required if `type` is "specific"

Set to `true` to output debug information to the bot logs

Source of the prompt, e.g. agent/:id/:version cards/ai-generate, cards/ai-task, nodes/autonomous, etc.

Name of the integration that originally received the message that initiated this action

Response ID from LLM provider

LLM provider name

Model name

Some LLMs may generate invalid JSON for a tool call, so this will be `null` when it happens.

Required if `type` is "tool_calls"

Required if `type` is "tool_result"

Indicates the MIME type of the content. If not provided it will be detected from the content-type header of the provided URL.

Required if part type is "text"

Required if part type is "image"

Required unless `type` is "tool_call". If `type` is "multipart", this field must be an array of content objects. If `type` is "tool_result" then this field should be the result of the tool call (a plain string or a JSON-encoded array or object). If `type` is "tool_call" then the `toolCalls` field should be used instead.

Number of input tokens used by the model

Cost of the input tokens received by the model, in U.S. dollars

Number of output tokens used by the model

Cost of the output tokens generated by the model, in U.S. dollars

inputTokens inputCost outputTokens outputCost

Total cost of the content generation, in U.S. dollars

id provider model choices usage botpress

Expiration of the generated image in days, after which the image will be automatically deleted to free up storage space in your account. The default is to keep the image indefinitely (no expiration). The minimum is 30 days and the maximum is 90 days.

Image style - Only supported by DALL-E 3 models

User ID to associate with the image, for abuse detection purposes

Model name used

Temporary URL of generated image

Cost of the image generation, in U.S. dollars (DEPRECATED)

Cost of the image generation, in U.S. dollars

Expiration of the generated audio file in days, after which the file will be automatically deleted to free up storage space in your account. The default is to keep the file indefinitely (no expiration). The minimum is 30 days and the maximum is 90 days.

URL to the audio file with the generated speech

Cost of the speech generation, in U.S. dollars

Cost per image generation, in U.S. dollars

Available image sizes

Default image size generated by model

recommended deprecated general-purpose low-cost vision coding agents function-calling roleplay storytelling reasoning preview

Cost per 1 million tokens, in U.S. dollars

Cost per 1 million tokens, in U.S. dollars

Model to use for content generation

Cost per minute of speech transcription, in U.S. dollars

URL of the audio file to transcribe. The URL should return a content-type header in order to detect the audio format. Supported audio formats supported are: mp3, mp4, mpeg, mpga, m4a, wav, webm

The language of the input audio (optional). Supplying the input language in ISO-639-1 format will improve accuracy and latency.

An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.

The sampling temperature (optional), between 0 and 1. Defaults to 0 (automatic). Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

Detected language of the audio

Duration of the audio file, in seconds

Text content of the segment.

Unique identifier of the segment

Seek offset of the segment

Start time of the segment in seconds.

End time of the segment in seconds.

Array of token IDs for the text content.

Temperature parameter used for generating the segment.

Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.

Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.

Probability of no speech in the segment. If the value is higher than 1.0 and the avg_logprob is below -1, consider this segment silent.

text id seek start end tokens temperature avg_logprob compression_ratio no_speech_prob

Model name used

Total cost of the transcription, in U.S. dollars (DEPRECATED)

Total cost of the transcription, in U.S. dollars

language duration segments model cost botpress

Image style - Only supported by DALL-E 3 models

User ID to associate with the image, for abuse detection purposes

Model to use for content generation


llmz

createdAt updatedAt lastRunAt nextRunAt runs

Admin Mode

Indicates if the user is in admin mode

Is Analysis Dirty

'true' if the analysis is dirty (needs to run)

Cost

Cost of the conversation in $

Input Tokens

Number of input tokens in the conversation

Number of Messages

Number of messages in the conversation

Number of Participants

Number of participants in the conversation

Output Tokens

Number of output tokens in the conversation

Summary

Summary of the conversation

Title

Title of the conversation

Topics

Topics of the conversation, as a comma-separated list

browser

Browser

Capture screenshots and retrieve web page content with metadata for automated browsing and data extraction.

charts

charts

Easily generate a variety of charts, including line, bar, pie, and scatter plots, etc.

webchat

Webchat

Webchat integration for Botpress

pdf-generator

pdf-generator

Converts markdown content to PDF using PDFShift

cerebras

Cerebras

Get access to a curated list of Cerebras models for content generation and chat completions within your bot.

chat

Chat

Chat integration for Botpress; Allows interacting with your bot using HTTP requests.

telegram

Telegram

Engage with your audience in real-time.

openai

OpenAI


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | Microsoft was founded in 1975 by Bill Gates and Paul Allen.\n■002 | Botpress is an AI agent platform.\n■003 | It was founded in 2016.\n■004 | The company is based in Quebec, Canada.\n■005 | Apple was founded by Steve Jobs, Steve Wozniak, and Ronald Wayne in 1976.\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"When was Botpress founded?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■answer
2016. ■003


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | {\n■002 |   \"name\": \"Botpress\",\n■003 |   \"type\": \"AI Platform\",\n■004 |   \"founded\": 2016\n■005 | }\n■006 | {\n■007 |   \"name\": \"Dialogflow\",\n■008 |   \"type\": \"Chatbot Platform\",\n■009 |   \"founded\": 2011\n■010 | }\n■011 | {\n■012 |   \"name\": \"Rasa\",\n■013 |   \"type\": \"Chatbot Framework\",\n■014 |   \"founded\": 2016\n■015 | }\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"What type of product is Botpress?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■answer
AI Platform. ■003


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | The sky is blue.\n■002 | Grass is green.\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"What color is the sky?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■answer
Blue. ■001


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | Botpress supports multiple languages including English, French, and Spanish.\n■002 | The platform has built-in NLU capabilities.\n■003 | Botpress can integrate with various LLM providers like OpenAI and Anthropic.\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"What are the main features of Botpress?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■answer
- Supports multiple languages, including English, French, and Spanish. ■001
- Built-in NLU capabilities. ■002
- Integrates with various LLM providers like OpenAI and Anthropic. ■003


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | The capital of France is Paris.\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"What is the capital of France?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■answer
Paris. ■001


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | France is a country in Western Europe.\n■002 | It has a population of about 67 million people.\n■003 | Paris is its capital and largest city.\n■004 | France is known for its cuisine, wine, and culture.\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"Tell me about France.\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■answer
France is a country in Western Europe. ■001
It has a population of about 67 million people. ■002
Paris is its capital and largest city. ■003
It is known for its cuisine, wine, and culture. ■004


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | Botpress was founded in 2016.\n■002 | It has offices in multiple countries.\n■003 | The company is headquartered in Quebec, Canada.\n■004 | It provides an AI agent platform.\n■005 | The platform supports over 100 languages.\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"Where is Botpress located and when was it founded?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■answer
Botpress is headquartered in Quebec, Canada ■003, has offices in multiple countries ■002, and was founded in 2016 ■001.


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | Python is a programming language.\n■002 | Python is also a type of snake.\n■003 | The Python programming language was created by Guido van Rossum.\n■004 | Python snakes are found in Africa, Asia, and Australia.\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"What is Python?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■ambiguous
Python can refer to a programming language or a type of snake. ■001■002
■follow_up
Do you mean the Python programming language or the snake?
■answer
Python is a programming language, created by Guido van Rossum. ■001■003
■answer
Python is a type of snake found in Africa, Asia, and Australia. ■002■004


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | The word \"bank\" can refer to a financial institution.\n■002 | A bank can also mean the land alongside a river.\n■003 | Banks play a crucial role in the economy.\n■004 | River banks are important for ecosystems.\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"What is a bank?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■answer
A bank is either a financial institution or the land alongside a river. ■001■002


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | Botpress is an AI platform.\n■002 | It supports chatbot development.\n■003 | The platform integrates with various LLMs.\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"What is the recipe for chocolate cake?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■missing_knowledge
The documents do not include any culinary details or recipes. Missing specifics include the ingredient list, quantities, preparation steps, baking temperature, and baking time for a chocolate cake. The provided content only describes Botpress as an AI platform that supports chatbot development and integrates with various LLMs. ■001-003


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | JavaScript is a programming language.\n■002 | It runs in web browsers.\n■003 | Node.js allows JavaScript to run on servers.\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"How do I cook java beans?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■out_of_topic
The documents only discuss JavaScript and Node.js running in browsers and on servers, and contain no information about cooking or beans.


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | The Kubernetes control plane consists of the API server, scheduler, and controller manager.\n■002 | Pods are the smallest deployable units in Kubernetes that can be created and managed.\n■003 | A ReplicaSet ensures that a specified number of pod replicas are running at any given time.\n■004 | Services in Kubernetes provide stable networking endpoints for pods.\n■005 | ConfigMaps allow you to decouple configuration artifacts from container images.\n■006 | Persistent Volumes (PV) provide storage resources in a cluster.\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"What are the health benefits of Mediterranean diet?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■out_of_topic
The question is about the health benefits of the Mediterranean diet, but the provided documents only discuss Kubernetes components and resources (e.g., API server, Pods, ReplicaSets, Services, ConfigMaps, Persistent Volumes) and contain no information on nutrition or health.


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | Myocardial infarction, commonly known as a heart attack, occurs when blood flow to the heart is blocked.\n■002 | Symptoms include chest pain, shortness of breath, and pain in the arm or jaw.\n■003 | Risk factors include high blood pressure, high cholesterol, smoking, and diabetes.\n■004 | Treatment may involve medications such as aspirin, beta-blockers, and ACE inhibitors.\n■005 | Coronary angioplasty and stenting are common interventional procedures.\n■006 | Cardiac rehabilitation programs help patients recover and reduce future risk.\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"What is the current federal reserve interest rate?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■out_of_topic
The question asks about the current Federal Reserve interest rate, but the provided document only covers myocardial infarction (heart attack) symptoms, risk factors, and treatments. There is no information about interest rates or the Federal Reserve.


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | Python is a high-level programming language known for readability.\n■002 | JavaScript is primarily used for web development.\n■003 | Java is a statically-typed object-oriented language.\n■004 | C++ offers low-level memory manipulation capabilities.\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"What are the key features of COBOL mainframe programming?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■missing_knowledge
The provided documents only mention Python, JavaScript, Java, and C++, and do not include any information about COBOL or mainframe programming. Specific details needed include COBOL’s language characteristics, typical mainframe use cases, data/file handling, batch vs. online processing, interaction with mainframe utilities (e.g., job control), and common tooling/workflows. Without such content in the documents, the key features of COBOL mainframe programming cannot be derived.


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | Botpress is an AI platform.\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"Botpress.\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■answer
Botpress is an AI platform. ■001


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | Real content here about technology.\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"asdf jkl; qwer?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■invalid_question
The query "asdf jkl; qwer?" is not a meaningful or well-formed question; it appears to be random characters and does not specify what information is being requested.


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | Botpress is a platform.\n■002 | It was founded in Quebec.\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"What is the exact number of employees at Botpress?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■missing_knowledge
The documents do not provide the exact number of employees at Botpress. This specific detail is missing.


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | The company makes software.\n■002 | It has customers worldwide.\n■003 | The product is popular.\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"What was the revenue in Q3 2023?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■missing_knowledge
The documents do not provide any financial figures or revenue data, including the revenue amount for Q3 2023. Specific quarterly revenue details are missing. ■001-003


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | Botpress is an AI agent platform founded in 2016.\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"What is Botpress?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■answer
Botpress is an AI agent platform founded in 2016. ■001


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | This is a very long document. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. It contains many sentences. The answer is 42. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. More text here. \n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"What is the answer?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■answer
42. ■001


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | Plain text document.\n■002 | {\n■003 |   \"type\": \"object\",\n■004 |   \"value\": \"Object document\"\n■005 | }\n■006 | [\n■007 |   \"array\",\n■008 |   \"document\"\n■009 | ]\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"What types of documents are here?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■answer
Plain text ■001; object (JSON) ■002-005; and array ■006-009 documents.


Input: {"body":{"messages":[{"content":"You are an expert research assistant specialized in answering questions using only the information provided in documents.\n\n# Task\nAnswer the user's question based ONLY on the information in the provided documents. You MUST cite your sources using line numbers.\n\n# Document Format\nDocuments are provided with line numbers:\n■001 | First line of text\n■002 | Second line of text\n■003 | Third line of text\n\n# Citation Format\nYou MUST include citations immediately after statements. Use these formats:\n- Single line: ■035\n- Range: ■005-010\n- Multiple: ■035■046■094\n\n# Response Format\n\nChoose ONE of these response types:\n\n**TYPE 1 - ANSWER** (Use this when you can answer the question)\n■answer\n[Your answer with inline citations. ■001-003 More text. ■015]\n■end■\n\n**TYPE 2 - AMBIGUOUS** (Use when the question has multiple valid interpretations)\n■ambiguous\n[Explain the ambiguity]\n■follow_up\n[Ask a clarifying question]\n■answer\n[First interpretation with citations ■001]\n■answer\n[Second interpretation with citations ■005]\n■end■\n\n**TYPE 3 - OUT OF TOPIC** (Use when question is completely unrelated to documents)\n■out_of_topic\n[Explain why it's unrelated]\n■end■\n\n**TYPE 4 - INVALID QUESTION** (Use when input is not a proper question)\n■invalid_question\n[Explain why it's invalid]\n■end■\n\n**TYPE 5 - MISSING KNOWLEDGE** (Use ONLY when documents lack specific details needed)\n■missing_knowledge\n[Explain what specific information is missing]\n■end■\n\n# Important Rules\n- PREFER answering when possible - only use missing_knowledge if truly no relevant info exists\n- ALWAYS cite sources with line numbers\n- Use ONLY information from the documents\n- Be precise and factual\n- Do NOT fabricate information\n- Do NOT mention \"According to the documents\" or similar phrases – just provide a high-quality answer with citations\n- Do not be too strict on the question format; assume high-level answers are acceptable unless the question clearly asks for very specific details or requests depth beyond the documents\n\n# Additional Instructions\nHere are some additional instructions to follow about how to answer the question:\nProvide a clear and concise answer based on the documents.","role":"system"},{"content":"<documents>\n■001 | Email: support@botpress.com\n■002 | Price: $99.99\n■003 | Code: function() { return \"hello\"; }\n</documents>\n\nPlease answer the below question using the format specified above.\nQuestion to answer: \"What is the email address?\"","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.answer","promptSource":"zai:zai.answer:default"},"model":"best","reasoningEffort":"low","signal":{},"stopSequences":["■end■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■answer
support@botpress.com ■001