Prompt Engineering
Auto Prompt

Auto prompting

Taxonomy based auto prompting

Log10 is one of the first LLMOps platforms shipping with auto prompting (in alpha stage). Auto prompting, intially, provides actionable suggestions to users on how to improve their prompts in playgrounds or using our log10 python library.

This is an AI powered feature and applies a taxonomy inspired by SPADE (but rapidly evolving to include more recent work, like the prompting guidance from OpenAI and 26 guiding principles (opens in a new tab)) and an iterative algorithm to generate progressive suggestions (from green: low severity, through red: high severity).

Autoprompt example

How to use auto prompting in playgrounds

  1. Open or create a new playground

Autoprompt example

  1. Create or locate a new chat panel

Autoprompt example

  1. Type your prompt and click "Analyze". This step takes about 40 seconds to complete. Don't leave the page or close the browser tab while the analysis is running.

Autoprompt example

  1. Once the analysis is complete, you will see a new panel with the suggestions. Read and follow a suggstion and click "Analyze" again to see the next suggestion. Repeat until all suggestions are green.

Autoprompt example

NOTE That this is an iterative algorithm and context from previous suggestions and prompt changes is used to generate the next suggestion.

How to use auto prompting in log10 python library

If you want to access the auto prompting feature from the log10 python library, you can use the following code:

from log10.prompt_analyzer import PromptAnalyzer
 
 
analyzer = PromptAnalyzer()
 
init_prompt = """
You are an assistant communicating with Activision users on their support line.
Your job is to act as a agent and meticulously understand the customer problems and answer them."""
 
suggestions = analyzer.analyze(init_prompt)
print(f"Suggestions to the initial prompt: {suggestions}")
 
# make changes to the initial prompt
updated_prompt = """
You are an assistant communicating with Activision users on their support line.
 
## Here are examples of user request and responses:
### Example 1
 
User: I've noticed that my game freezes every time I try to start a new mission on Call of Duty. What should I do?
 
Assistant: Thank you for reaching out to us with your concern. I apologize for the inconvenience you're experiencing with the game freezing. To assist you better, could you please provide the following information: your gaming platform, the version of Call of Duty you're playing, and any error messages you receive? In the meantime, please ensure that your game and system software are up to date with the latest patches.
 
### Example 2
 
User: I'm trying to redeem a code for a Call of Duty DLC pack, but it says it's already been used. I bought it new from a retail store. Help!
 
Assistant: I understand how frustrating this must be. To resolve this issue, please send us a clear picture of the code you are trying to redeem along with the receipt showing the purchase. Once we have these details, we can investigate further and guide you through the next steps to get your DLC pack activated.
 
### Example 3
 
User: I'm getting a 'server unavailable' message when I try to join Call of Duty multiplayer matches, but my friends aren't having this problem. What's going on?
 
Assistant: I'm sorry to hear that you're having trouble connecting to our multiplayer servers. This issue can often be related to individual network settings. I would suggest performing a network connection test on your console or PC. If the test shows that your internet connection is stable, please try restarting your router. Should the problem persist, please get back to us with your network type (wired or wireless) and your Internet Service Provider (ISP), so we can assist you further.
"""
 
suggestions = analyzer.analyze(updated_prompt)
print(f"Suggestions to the updated prompt: {suggestions}")

NOTE That this is an iterative algorithm and context from previous suggestions and prompt changes is used to generate the next suggestion, so remember to call analyzer.analyze() with the updated prompts.

NOTE You need to setup LOG10 token and organization id in your environment variables to use the log10 python library. See Log10 Library (opens in a new tab) for more details.