wip
This commit is contained in:
parent
cc89f0c75c
commit
afd28d934e
26 changed files with 2103 additions and 427 deletions
3
data-pipeline/config/batch.ts
Normal file
3
data-pipeline/config/batch.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export const BATCH_CONFIG = { size: 4, maxRetries: 3 } as const;
|
||||
|
||||
//1, 2, 5, 10, 20
|
||||
5
data-pipeline/config/llm.ts
Normal file
5
data-pipeline/config/llm.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
export const LLM_CONFIG = {
|
||||
provider: "local" as "local" | "openrouter" | "deepseek" | "gemini",
|
||||
url: "http://127.0.0.1:8080/v1/chat/completions",
|
||||
model: undefined as string | undefined,
|
||||
} as const;
|
||||
34
data-pipeline/config/prompt.ts
Normal file
34
data-pipeline/config/prompt.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
export const ENRICHMENT_SYSTEM_PROMPT = `You are a multilingual dictionary engine. Output ONLY a JSON object. No markdown, no explanations.
|
||||
|
||||
For each English noun provided, generate 1-2 distinct senses.
|
||||
|
||||
CEFR difficulty mapping:
|
||||
- A1/A2 → easy
|
||||
- B1/B2 → medium
|
||||
- C1/C2 → hard
|
||||
|
||||
Each sense must have:
|
||||
- sense: student-friendly definition, max 15 words
|
||||
- example: natural sentence using the word
|
||||
- difficulty_level: easy, medium, or hard
|
||||
- translations: object with keys de, it, es, fr; each value is an array of {word, gender} where gender MUST be masculine, feminine, or neuter. Use null ONLY if the language has no grammatical gender for that word.
|
||||
|
||||
Output format: JSON object where keys are the input words, values are arrays of sense objects.
|
||||
|
||||
Example for ["house"]:
|
||||
{
|
||||
"house": [
|
||||
{
|
||||
"sense": "A building for human habitation.",
|
||||
"example": "They bought a house in the city.",
|
||||
"difficulty_level": "easy",
|
||||
"translations": {
|
||||
"de": [{"word": "Haus", "gender": "neuter"}],
|
||||
"it": [{"word": "casa", "gender": "feminine"}],
|
||||
"es": [{"word": "casa", "gender": "feminine"}],
|
||||
"fr": [{"word": "maison", "gender": "feminine"}]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
`;
|
||||
Loading…
Add table
Add a link
Reference in a new issue