Skip to main content

Best Practices

To get the most accurate and relevant responses from our LLMs (Llama 3, Claude, GPT-OSS), follow these prompting best practices.

1. Be Specific

Vague prompts lead to vague answers. Provide clear context and instructions.
  • Bad: “Write code.”
  • Good: “Write a Python function to calculate the Fibonacci sequence recursively.”

2. Use Examples (Few-Shot Prompting)

Providing examples of the desired output format often improves performance significantly. Prompt:
Convert the following movie titles to emojis.

Back to the Future: 🔙🚗💨
The Matrix: 🕶️💊🐇
Star Wars: ⭐️⚔️🚀
Titanic:

3. Chain of Thought

For complex reasoning tasks, ask the model to “think step by step”. Prompt:
Solve the following math word problem. Think step by step to arrive at the solution.

John has 5 apples. He buys 3 more. Then he gives 2 to his sister. How many apples does he have now?