prepareAsk method
Future<RagAskPrompt>
prepareAsk(
- String question, {
- int topK = 5,
- int tokenBudget = 1500,
- RagPromptBuilder buildPrompt = defaultAskPrompt,
Searches for question and builds the prompt for an LLM, without calling
one. Use it to stream the answer with your own SDK, then pass the
complete answer to RagAskPrompt.answer.
Searches like searchHybridWithContext for topK passages within
tokenBudget engine tokens. Citation ids start at 1 for every question.
The prompt is empty when nothing was found.
Implementation
Future<RagAskPrompt> prepareAsk(
String question, {
int topK = 5,
int tokenBudget = 1500,
RagPromptBuilder buildPrompt = defaultAskPrompt,
}) => prepareAskWith(
_askTool(topK, tokenBudget),
question,
buildPrompt: buildPrompt,
);