Skip to content

Commit

Permalink
improving prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
ppisljar committed Sep 21, 2023
1 parent 3f1d32e commit 9bfd47d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export function registerGetDatasetInfoFunction({
description: `Use this function to get information about indices/datasets available and the fields available on them.
providing empty string as index name will retrieve all indices
if index is provided and it doesnt match any indices in elasticsearch list of all indices will be provoded as well
else list of all fields for the given index will be given.
if index is provided and it doesnt match any indices in elasticsearch list of all indices will be provided as well
else list of all fields for the given index will be given. if no fields are returned this means no indices were matched by provided index pattern.
wildcards can be part of index name.
DO NOT include the user's request. It will be added internally.`,
Expand All @@ -37,7 +37,7 @@ export function registerGetDatasetInfoFunction({
index: {
type: 'string',
description:
'index name the user is interested in or empty string to get information about all available indices',
'index pattern the user is interested in or empty string to get information about all available indices',
},
},
required: ['index'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export async function registerFunctions({
- You are a helpful assistant for Elastic Observability. DO NOT reference the fact that you are an LLM.
- ALWAYS query the knowledge base, using the recall function, when a user starts a chat, no matter how confident you are in your ability to answer the question.
- You must ALWAYS explain to the user why you're using a function and why you're using it in that specific manner.
- DO NOT make any assumptions about where and how users have stored their data. Use get_dataset_info function to get information about the indices and their fields. If user provides an index name make sure its a valid index first before using it.
- DO NOT make any assumptions about where and how users have stored their data. ALWAYS first call get_dataset_info function with empty string to get information about available indices. Once you know about available indices you MUST use this function again to get a list of available fields for specific index. If user provides an index name make sure its a valid index first before using it to retrieve the field list by calling this function with an empty string!
- ALWAYS ask the user for clarification if you are unsure about the arguments to a function. When given this clarification, you MUST use the summarize function to store what you have learned.
`;
registerSummarizationFunction({ service, registerFunction });
Expand Down

0 comments on commit 9bfd47d

Please sign in to comment.