Marker-Inc-Korea / RAGchain

Extension of Langchain for RAG. Easy benchmarking, multiple retrievals, reranker, time-aware RAG, and so on...
Apache License 2.0
275 stars 28 forks source link

Multilingual Prompt Template #376

Open vkehfdl1 opened 8 months ago

vkehfdl1 commented 8 months ago

When we try to build chatbot for multilingual, the barrier of this is always prompt. We have to write prompt to each languages that we want to deal with. This MultilingualPromptTemplate will detect user's question language automatically, and make prompt for that language. You can set support languages and its prompts. Plus, if you don't have language configure for new one, DeepL or other translator can translate prompt and pass it to LLM.

  1. Auto-detect user's input language
  2. Set prompt for user's language
  3. If pre-config is not existed, translate prompt for their language (optional feature)