Azure-Samples / azure-search-openai-demo

A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure AI Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
https://azure.microsoft.com/products/search
MIT License
6.35k stars 4.25k forks source link

Feature: creation and usage of custom prompts #2098

Open cforce opened 3 weeks ago

cforce commented 3 weeks ago

Allow users to create ,manage and use custom prompts. Simply by typing "/" in the question or chat input an overlay dialogue will pop up above dialogue and gives option to choose existing, add new or delete prompts organized in categories/tree. Selecting a prompt item from the view will inject into the ask/chat input exactly t the choosen position of "/" and replace it. A prompt exist of a unque name and a prompt text. The overlay dialogue shall search while typing in prompt list

image

pamelafox commented 2 weeks ago

I see this a lot in generic chat apps, but not as much in RAG apps, since the prompt very carefully explains how to provide citations in the right format. How would you imagine that custom prompts would interact with our need for particular syntax in the responses?

cforce commented 2 weeks ago

Currently, the prompt feature in developer settings allows users to extend or customize inputs, but it would be helpful to improve its accessibility and flexibility. This request proposes a more user-friendly way to inject predefined questions and set general search context effortlessly.

Proposed Enhancement:

  1. Dropdown Prompt Selection: Enable users to open a searchable dropdown menu by typing "/" in the input field. This would show all prompt templates with further filtering available as more letters are typed.

  2. Quick Selection and Editing: Allow users to navigate this dropdown with the mouse or keyboard (using keyboard navigation up/doen and "Enter" or mouse and click to confirm), making it easy to select, edit, or add prompts on the fly.

  3. Persistent Prompt Management: Introduce an "Edit Prompts" option to save custom prompts, making them persistently available across sessions for quicker setup. Later persist prompts in backend and make them reusable for others so the can add them to their collection.

  4. Application Beyond Dev Settings: Extend this feature to apply not only in developer settings but also directly in chat or query sections. By typing "/", users could replace static predefined questions with dynamic, customizable templates suited to each session's needs.

This enhancement would offer a more interactive, accessible way to adjust prompts, enhancing user productivity and adaptability in various search or chat contexts. Instead of using categoric filtering only users can give context this way as well. Also the prompt template names can be used as http url param to store presented bookmarks with a certain context . The feature is UI extension only