Skip to content

Commit

Permalink
Better Web Search Query
Browse files Browse the repository at this point in the history
I updated prompt of AI to get better search result and understands users demand and generate useful query.

Why I updated this?
Because current model is good in generating query for easy and short tasks but for complex tasks, they do not generate proper query.
  • Loading branch information
KingNish24 authored Jun 30, 2024
1 parent 3704cc0 commit e579618
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/server/websearch/search/generateQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ Current Question: Where is it being hosted?`,

const webQuery = await generateFromDefaultEndpoint({
messages: convQuery,
preprompt: `You are tasked with generating web search queries. Give me an appropriate query to answer my question for google search. Answer with only the query. Today is ${currentDate}`,
preprompt: `You are an expert in crafting concise and effective web search queries. However, keep in that sometimes you may encounter completely unfamiliar terms or concepts. When faced with such uncertainty, please refrain from attempting to substitute or interpret the term in any way. Instead, prioritize maintaining the integrity of the original phrasing as much as possible. Please only provide the query, without answering the question directly. Your task is to give me the best possible query to answer the user's question on Google Search. Today's date is ${currentDate}`,
generateSettings: {
max_new_tokens: 30,
max_new_tokens: 40,
},
});

Expand Down

0 comments on commit e579618

Please sign in to comment.