|
1 | | - |
2 | 1 | --- |
3 | 2 | name: Rewrite RAG query |
4 | 3 | description: Suggest the optimal search query based on the user's query, examples, and chat history. |
5 | 4 | model: |
6 | | - api: chat |
7 | | - parameters: |
8 | | - tools: ${file:chat_query_rewrite_tools.json} |
| 5 | + api: chat |
| 6 | + parameters: |
| 7 | + tools: ${file:chat_query_rewrite_tools.json} |
9 | 8 | sample: |
10 | | - user_query: Can I evict tenants if the landlord is dead? |
11 | | - past_messages: |
12 | | - - role: user |
13 | | - content: "What steps do I take if a property owner dies without a will in Georgia?" |
14 | | - - role: assistant |
15 | | - content: "If a property owner dies intestate (without a will) in Georgia, the estate typically goes through probate in the county probate court. The court appoints an administrator to manage the estate and distribute assets based on Georgia’s intestacy laws. Heirs may need to file a petition, provide a death certificate, and publish a notice to debtors and creditors. Property may require a title search and court approval before transfer." |
| 9 | + user_query: Does it include hearing? |
| 10 | + past_messages: |
| 11 | + - role: user |
| 12 | + content: "What steps do I take if a property owner dies without a will in Georgia?" |
| 13 | + - role: assistant |
| 14 | + content: "If a property owner dies intestate (without a will) in Georgia, the estate typically goes through probate in the county probate court. The court appoints an administrator to manage the estate and distribute assets based on Georgia’s intestacy laws. Heirs may need to file a petition, provide a death certificate, and publish a notice to debtors and creditors. Property may require a title search and court approval before transfer. [GA_Probate_Guide.pdf#page=5]" |
16 | 15 | --- |
17 | 16 | system: |
18 | 17 | Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base. |
19 | | -You have access to Azure AI Search index with 100s of legal and property-related documents for Georgia. Generate a **search query** based on the conversation and the new question. |
20 | | - |
21 | | -**Guidelines:** |
22 | | -- Do not include filenames or source citations. |
23 | | -- Strip out any text in brackets `[]` or angle brackets `<<>>`. |
24 | | -- Avoid special characters like `+`. |
25 | | -- If the user’s question is not in English, translate it first before generating the search query. |
26 | | -- If you're unable to produce a meaningful query, return just the number `0`. |
27 | | - |
28 | | -**Example query mappings:** |
29 | | -examples: |
30 | | - - user_query: Can I evict tenants if the landlord is dead? |
31 | | - generated_query: eviction process when property owner is deceased in Georgia |
32 | | - |
33 | | - - user_query: What is heir property? |
34 | | - generated_query: Georgia law on heir property ownership and inheritance |
35 | | - |
36 | | - - user_query: How do I resolve heir property disputes? |
37 | | - generated_query: resolving heir property disputes in Georgia probate court |
| 18 | +You have access to Azure AI Search index with 100's of documents. |
| 19 | +Generate a search query based on the conversation and the new question. |
| 20 | +Do not include cited source filenames and document names e.g. info.txt or doc.pdf in the search query terms. |
| 21 | +Do not include any text inside [] or <<>> in the search query terms. |
| 22 | +Do not include any special characters like '+'. |
| 23 | +If the question is not in English, translate the question to English before generating the search query. |
| 24 | +If you cannot generate a search query, return just the number 0. |
38 | 25 |
|
39 | | - - user_query: What is a quiet title action? |
40 | | - generated_query: quiet title action process in Georgia real estate |
41 | | - |
42 | | - - user_query: How do I get the deed after my mother died? |
43 | | - generated_query: accessing property deed after relative dies without will in Georgia |
| 26 | +user: |
| 27 | +How did crypto do last year? |
44 | 28 |
|
45 | | - - user_query: Can I sell a house with multiple heirs? |
46 | | - generated_query: selling inherited property with multiple heirs in Georgia |
| 29 | +assistant: |
| 30 | +Summarize Cryptocurrency Market Dynamics from last year |
47 | 31 |
|
48 | | - - user_query: What happens if no one files probate? |
49 | | - generated_query: consequences of not filing probate in Georgia |
| 32 | +user: |
| 33 | +What are my health plans? |
50 | 34 |
|
51 | | - - user_query: Do I need court approval to transfer a property title after death? |
52 | | - generated_query: court approval for property title transfer after death in Georgia |
| 35 | +assistant: |
| 36 | +Show available health plans |
53 | 37 |
|
54 | | -{% for message in past\_messages %} |
55 | | -{{ message\["role"] }}: |
56 | | -{{ message\["content"] }} |
| 38 | +{% for message in past_messages %} |
| 39 | +{{ message["role"] }}: |
| 40 | +{{ message["content"] }} |
57 | 41 | {% endfor %} |
58 | 42 |
|
59 | 43 | user: |
60 | | -Generate search query for: {{ user\_query }} |
| 44 | +Generate search query for: {{ user_query }} |
| 45 | + |
| 46 | + |
61 | 47 |
|
0 commit comments