Skip to content

Commit eddb98c

Browse files
authored
update to use Claude 3.5 Haiku (#408)
1 parent c3091ab commit eddb98c

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

backend/retrieval_graph/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ class AgentConfiguration(BaseConfiguration):
1515
# models
1616

1717
query_model: str = field(
18-
default="openai/gpt-4o-mini",
18+
default="anthropic/claude-3-5-haiku-20241022",
1919
metadata={
2020
"description": "The language model used for processing and refining queries. Should be in the form: provider/model-name."
2121
},
2222
)
2323

2424
response_model: str = field(
25-
default="openai/gpt-4o-mini",
25+
default="anthropic/claude-3-5-haiku-20241022",
2626
metadata={
2727
"description": "The language model used for generating responses. Should be in the form: provider/model-name."
2828
},

backend/tests/evals/test_e2e.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
from langchain_core.documents import Document
66
from langchain_core.messages import AIMessage
77
from langchain_core.prompts import ChatPromptTemplate
8-
from langchain_openai import ChatOpenAI
98
from langsmith.evaluation import EvaluationResults, aevaluate
109
from langsmith.schemas import Example, Run
1110
from pydantic import BaseModel, Field
1211

1312
from backend.retrieval_graph.graph import graph
14-
from backend.utils import format_docs
13+
from backend.utils import format_docs, load_chat_model
1514

1615
DATASET_NAME = "chat-langchain-qa"
1716
EXPERIMENT_PREFIX = "chat-langchain-ci"
@@ -20,10 +19,9 @@
2019
SCORE_ANSWER_CORRECTNESS = "answer_correctness_score"
2120
SCORE_ANSWER_VS_CONTEXT_CORRECTNESS = "answer_vs_context_correctness_score"
2221

23-
# claude sonnet / gpt-4o are a bit too expensive
24-
JUDGE_MODEL_NAME = "gpt-4o-mini"
22+
JUDGE_MODEL_NAME = "anthropic/claude-3-5-haiku-20241022"
2523

26-
judge_llm = ChatOpenAI(model_name=JUDGE_MODEL_NAME)
24+
judge_llm = load_chat_model(JUDGE_MODEL_NAME)
2725

2826

2927
# Evaluate retrieval

frontend/app/components/SelectModel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import {
1010
} from "./ui/select";
1111

1212
const modelOptionsAndLabels: Partial<Record<ModelOptions, string>> = {
13+
"anthropic/claude-3-5-haiku-20241022": "Claude 3.5 Haiku",
1314
"openai/gpt-4o-mini": "GPT 4o Mini",
14-
"anthropic/claude-3-haiku-20240307": "Claude 3 Haiku",
1515
// "groq/llama3-70b-8192": "Llama3 70b (Groq)",
1616
"google_genai/gemini-pro": "Gemini Pro",
1717
};
@@ -24,7 +24,7 @@ export function SelectModelComponent() {
2424
<Select
2525
onValueChange={(v) => setSelectedModel(v as ModelOptions)}
2626
value={selectedModel}
27-
defaultValue="openai/gpt-4o-mini"
27+
defaultValue="anthropic/claude-3-5-haiku-20241022"
2828
>
2929
<SelectTrigger className="w-[180px] border-gray-600 text-gray-200">
3030
<SelectValue placeholder="Model" />

frontend/app/contexts/GraphContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function GraphProvider({ children }: { children: ReactNode }) {
6262
const { shareRun } = useRuns();
6363
const [messages, setMessages] = useState<BaseMessage[]>([]);
6464
const [selectedModel, setSelectedModel] =
65-
useState<ModelOptions>("openai/gpt-4o-mini");
65+
useState<ModelOptions>("anthropic/claude-3-5-haiku-20241022");
6666

6767
const streamMessage = async (params: GraphInput): Promise<void> => {
6868
if (!threadId) {

frontend/app/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ export type Feedback = {
2121

2222
export type ModelOptions =
2323
| "openai/gpt-4o-mini"
24-
| "anthropic/claude-3-haiku-20240307"
24+
| "anthropic/claude-3-5-haiku-20241022"
2525
| "groq/llama3-70b-8192"
2626
| "google_genai/gemini-pro";

0 commit comments

Comments
 (0)