Amazon SageMaker is a fully managed service that is used to quickly and easily build, train and deploy machine learning (ML) models.
Amazon SageMaker Experiments is a capability of Amazon SageMaker
that lets you organize, track, compare and evaluate ML experiments and model versions.
This notebook shows how LangChain Callback can be used to log and track prompts and other LLM hyperparameters into SageMaker Experiments
. Here, we use different scenarios to showcase the capability:
- Scenario 1: Single LLM - A case where a single LLM model is used to generate output based on a given prompt.
- Scenario 2: Sequential Chain - A case where a sequential chain of two LLM models is used.
- Scenario 3: Agent with Tools (Chain of Thought) - A case where multiple tools (search and math) are used in addition to an LLM.
Installation and Setup
- OpenAI: platform.openai.com/account/api-keys (For OpenAI LLM model)
- Google SERP API: serpapi.com/manage-api-key (For Google Search Tool)