Feature Request: Support Native-Language Fact Extraction in /sdk/augmentation
Is your feature request related to a problem?
Our application operates in the EU/Scandinavian region
While we have successfully transitioned our embedding model to paraphrase-multilingual-MiniLM-L12-v2 to support multilingual vector space, we are encountering a limitation in the /sdk/augmentation endpoint.
Currently, the endpoint automatically extracts and translates all facts into English, regardless of the input language. This creates three primary issues:
- Loss of Nuance: There is a semantic mismatch when encoding
native_language_query → english_factcompared tonative_language_query → native_language_fact. - Operational Friction: Local operators inspecting the database find it counterintuitive to manage and review English-translated content when the conversation occurred in a local language.
- Lack of Configuration: There is currently no mechanism within
AugmentationPayloadorMetaDatato specify the desired output language for extraction.
We request the ability to pass a language hint to the /sdk/augmentation endpoint to ensure extracted facts remain in the user's native language.
The Solution
We propose adding an optional extraction.language field to the MetaData object in the augmentation payload.
Proposed Payload Update
{
"conversation": { "messages": [...], "summary": "..." },
"meta": {
...,
"extraction": {
"language": "sv" // ISO 639-1 code; "auto" or null defaults to current English behavior
}
}
}Implementation Details
- Backwards Compatibility: If
languageis omitted or set tonull/"auto", the service should maintain current behavior (defaulting to English). - Behavior: If a valid ISO 639-1 code is provided, the extractor should produce facts in the specified language.
- SDK Contribution: We have identified the necessary location for this update (
memori/memory/augmentation/augmentations/memori/models.py) and are prepared to submit a PR for the SDK side if the backend changes are approved.
With love and lingonberries, The Imago team
Alternatives Considered
No response
Affected Components
Vector Store / Memory
Participation
- I am willing to submit a pull request for this feature.
Source: MemoriLabs/Memori