llamaindex
Version:
<p align="center"> <img height="100" width="100" alt="LlamaIndex logo" src="https://ts.llamaindex.ai/square.svg" /> </p> <h1 align="center">LlamaIndex.TS</h1> <h3 align="center"> Data framework for your LLM application. </h3>
29 lines (28 loc) • 1.12 kB
JavaScript
import { PromptTemplate } from "@llamaindex/core/prompts";
export const defaultSingleSelectPrompt = new PromptTemplate({
templateVars: [
"context",
"query",
"numChoices"
],
template: `Some choices are given below. It is provided in a numbered list (1 to {numChoices}), where each item in the list corresponds to a summary.
---------------------
{context}
---------------------
Using only the choices above and not prior knowledge, return the choice that is most relevant to the question: '{query}'
`
});
export const defaultMultiSelectPrompt = new PromptTemplate({
templateVars: [
"contextList",
"query",
"maxOutputs",
"numChoices"
],
template: `Some choices are given below. It is provided in a numbered list (1 to {numChoices}), where each item in the list corresponds to a summary.
---------------------
{contextList}
---------------------
Using only the choices above and not prior knowledge, return the top choices (no more than {maxOutputs}, but only select what is needed) that are most relevant to the question: '{query}'
`
});