Answer Server 25.4
Answer Server Help

# PromptTemplatePath

The path to the RAG prompt template file. This parameter applies only when Type is set to `RAG`.

The RAG system sends a prompt to send to the LLM with the original user question and the context documents from your Knowledge Discovery index. The prompt template is a text file that defines the format of this prompt. In the template, you must use the token `{{question}}`, which Answer Server replaces with the user question, and the token `{{context}}`, which Answer Server replaces with relevant text from the candidate documents.

For example:

    Provide an answer for {{question}} based on the following text: {{context}}

For each question that you ask the RAG system, Answer Server substitutes the question and context documents, and sends the result to the configured LLM to generate an answer.

CAUTION: Answer Server substitutes user-supplied input, in the form of the question text, into the template before it passes the resulting text to the LLM.

You must design your prompt templates to mitigate against prompt engineering attacks, where malicious users create input that changes the LLM behavior. The best practice varies according to the model that you use, so you must consult the recommendations for your chosen model.

Type: | String
Default: |
Required: | No
Configuration Section: | MySystem
Example: | `PromptTemplatePath=./rag/prompts/rag_prompt.txt`
See Also: |

Copyright 2016-2025 Open Text
Version 25.4 | Last updated October 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery Answer Server 25.4

Topic Title: PromptTemplatePath