invokeModel
or Converse
API to make requests to your modelsSelecting the Right Model: Understand the various models available (e.g., Anthropic's Claude 3.5 Sonnet, Claude 3 Opus, Claude 3.5 Haiku) and their strengths to choose the most suitable one for your use case.
Prompt Engineering: Leverage prompting techniques such as being clear and direct, using a structured prompt, leveraging examples, and implementing chain of thought to improve the quality of the model's outputs.
Handling Latency: Use techniques like streaming outputs, leveraging faster models, reducing the number of output tokens, and prompt caching to optimize latency.
Generating Structured Data: Provide clear instructions, use examples, and explore advanced techniques like tool use to get consistent, high-quality structured data from the LLM.
Evaluating LLM Features: Utilize a combination of evaluation methods, including vibes, human-based evaluation, A/B testing, programmatic checks, and LLM-as-judge, to quickly and confidently iterate on your LLM-powered products.