ibm-granite-community / pm

Granite Community Project Management
0 stars 0 forks source link

Ensure Optimized Prompts (Snacks & Kitchen) #147

Closed fayvor closed 1 month ago

fayvor commented 1 month ago

Referring to the Prompt Guide, ensure optimized prompts in these recipes:

In addition, investigate how the Langchain Replicate client assembles its prompt string:

Out of scope for this ticket:

fayvor commented 1 month ago

Here is an example of the Prompt Guide style: https://replicate.com/p/jw1vb5af4srm60cjjpk8ftv7h8

<|start_of_role|>user<|end_of_role|>
    Show me a SQL query that fetches all columns for the first 50 rows
    in a table named 'users'.<|end_of_text|>
<|start_of_role|>assistant<|end_of_role|>

Here is how Langchain stringifies a ChatPromptTemplate: https://replicate.com/p/a037rbxpsxrm00cjjpjr8t4zsc

System: You are a helpful AI bot. Your name is Bob.
Human: Hello, how are you doing?
AI: I'm doing well, thanks!
Human: What is your name?
fayvor commented 1 month ago

Langchain Hub is a community exchange for prompt designs for various purposes. You can filter by task type and model (I saw the model filter in a video but don't see it in the hub).

This may be worthwhile publishing the Prompt Guide templates to.

fayvor commented 1 month ago

Granite Kitchen PR here.

fayvor commented 1 month ago

Snack PR here.