Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion functions/prompts/analyze-collocation.prompt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
model: vertexai/gemini-2.0-flash-001
model: vertexai/gemini-3-flash-preview
input:
schema:
collocation: string
Expand Down
6 changes: 4 additions & 2 deletions functions/prompts/analyze-image.prompt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
---
model: vertexai/gemini-2.0-flash-001
model: vertexai/gemini-2.5-flash
config:
maxOutputTokens: 65536
input:
schema:
base64ImageUrl: string
output:
schema: ImageAnalysisSchema
---
Read the Chinese text in this image: {{media url=base64ImageUrl}}, split it into sentences, and then explain it, including an English translation for each sentence and any relevant grammar rules.
Read the Chinese text in this image: {{media url=base64ImageUrl}}. Split the complete text into every individual sentence, providing pinyin and an English translation for each one. Then provide an overall plain-text explanation of the passage and any relevant grammar rules.
If the image contains good English translations of the Chinese text, use those verbatim.
2 changes: 1 addition & 1 deletion functions/prompts/explain-chinese.prompt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
model: vertexai/gemini-2.0-flash-001
model: vertexai/gemini-3-flash-preview
input:
schema:
text: string
Expand Down
2 changes: 1 addition & 1 deletion functions/prompts/explain-english.prompt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
model: vertexai/gemini-2.0-flash-001
model: vertexai/gemini-3-flash-preview
input:
schema:
text: string
Expand Down
2 changes: 1 addition & 1 deletion functions/prompts/explain-word-in-context.prompt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
model: vertexai/gemini-2.0-flash-001
model: vertexai/gemini-3-flash-preview
input:
schema: ExplainWordInContextInputSchema
output:
Expand Down
2 changes: 1 addition & 1 deletion functions/prompts/generate-chinese-sentences.prompt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
model: vertexai/gemini-2.0-flash-001
model: vertexai/gemini-3-flash-preview
input:
schema: GenerateChineseSentencesInputSchema
output:
Expand Down
4 changes: 2 additions & 2 deletions functions/src/genkit-eval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export const grammarExplanationQualityEvaluator = ai.defineEvaluator(
JSON.stringify(datapoint.output);

const { output: evalResult } = await ai.generate({
model: vertexAI.model('gemini-3-pro-preview'),
model: vertexAI.model('gemini-3.1-pro-preview'),
prompt: `You are evaluating a Chinese language learning tool's output quality.

Input (Chinese text to explain): ${input}
Expand Down Expand Up @@ -248,7 +248,7 @@ export const sentenceGenerationQualityEvaluator = ai.defineEvaluator(
JSON.stringify(datapoint.output);

const { output: evalResult } = await ai.generate({
model: vertexAI.model('gemini-3-pro-preview'),
model: vertexAI.model('gemini-3.1-pro-preview'),
prompt: `You are evaluating generated Chinese example sentences for a language learning app.

Input (word and definitions): ${input}
Expand Down
Loading