Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance prompting with techniques heard at Anthropic Vertex AI RAG talk #45

Closed
MrCsabaToth opened this issue Aug 29, 2024 · 2 comments
Closed
Assignees
Labels
enhancement New feature or request function tooling Generative AI Function / Tooling related RAG Retrieval Augmented Generation related

Comments

@MrCsabaToth
Copy link
Member

Related repo: https://github.com/anthropics/courses/tree/master/real_world_prompting

There were some good blueprints about prompt sections and the ordering of those:
Screenshot_2024-08-28_11-15-21
Screenshot_2024-08-28_11-22-39

Note about the 2nd section: "Dynamic content / RAG (step 2) also covers Tools listing? How about chat history? What should be the order of RAG doc snippets, tool / function listing, tool return results, chat history?" Answer:

  • Tool definitions: kinda with the system prompt, up front
  • If there are any tools examples that would go to the example section (below, later)
  • RAG doc snippets: in the dynamic section
  • Chat history: in the example section

More slides:

Screenshot_2024-08-28_11-25-28
Screenshot_2024-08-28_11-29-28
Screenshot_2024-08-28_11-36-27

Screenshot_2024-08-28_11-37-32
Screenshot_2024-08-28_11-48-35

Related: #44

@MrCsabaToth MrCsabaToth added enhancement New feature or request RAG Retrieval Augmented Generation related function tooling Generative AI Function / Tooling related labels Aug 29, 2024
@MrCsabaToth MrCsabaToth self-assigned this Sep 2, 2024
MrCsabaToth added a commit that referenced this issue Sep 3, 2024
MrCsabaToth added a commit that referenced this issue Sep 4, 2024
(We pass the declarations natively anyway, so leaving out the extra XML saves a good number of tokens.
Extra XML didn't improve anything, it rather seemed to confuse or degrade the function calling capability)
MrCsabaToth added a commit that referenced this issue Sep 4, 2024
…er models are better out of the box regarding strategical thinking. #45
MrCsabaToth added a commit that referenced this issue Sep 4, 2024
…ling, reasoning and multi modal capabilities #48 #45

(There's a 0827 /2024 Aug 27/ experimental model vs the current stable is 0514 May 14th)
MrCsabaToth added a commit that referenced this issue Sep 4, 2024
…watermark history retrieval #45 align translation and resolver prompts for all this
MrCsabaToth added a commit that referenced this issue Sep 4, 2024
MrCsabaToth added a commit that referenced this issue Sep 12, 2024
…ag. The strippedText needs to take into account that the opening tag might not be in the response! #45
@MrCsabaToth
Copy link
Member Author

Note that Anthropic prompt conversations can differ from Gemini or OpenAI or other LLMs, it mainly depends on how they were trained and RLHFd.
We may need to make small adjustments but so far Gemini is able to understand the XML tagging, to the point that it only responds with the closing tag because I prefilled the prompt with the opening tag.

@MrCsabaToth
Copy link
Member Author

We mostly refactored the prompts. It's a question how much these Anthropic style XML tags are bode well with Gemini. Time will tell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request function tooling Generative AI Function / Tooling related RAG Retrieval Augmented Generation related
Projects
None yet
Development

No branches or pull requests

1 participant