Friday, May 9, 2025
News PouroverAI
Visit PourOver.AI
No Result
View All Result
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing
News PouroverAI
No Result
View All Result

Beyond English: Implementing a multilingual RAG solution | by Jesper Alkestrup | Dec, 2023

December 20, 2023
in Data Science & ML
Reading Time: 2 mins read
0 0
A A
0
Share on FacebookShare on Twitter



Splitting text into appropriately sized chunks is crucial when preparing data for embedding and retrieval in a RAG system. Two main factors guide this process: Model Constraints and Retrieval Effectiveness.

Model Constraints:
– Embedding models have a maximum token length for input, and anything beyond this limit gets truncated. It’s important to be aware of the limitations of your chosen model and ensure that each data chunk doesn’t exceed this maximum token length.
– Multilingual models often have shorter sequence limits compared to English models. For example, the Paraphrase multilingual MiniLM-L12 v2 model has a maximum context window of 128 tokens.
– Consider the text length the model was trained on. Some models might technically accept longer inputs but were trained on shorter chunks, which could affect performance on longer texts. An example is the Multi QA base from SBERT.

Retrieval Effectiveness:
– While chunking data to the model’s maximum length seems logical, it may not always lead to the best retrieval outcomes. Larger chunks offer more context but can obscure key details, making it harder to retrieve precise matches. Smaller chunks can enhance match accuracy but might lack the necessary context for complete answers. Hybrid approaches use smaller chunks for search but include surrounding context at query time for balance.
– The considerations for chunk size remain consistent whether working on multilingual or English projects. There isn’t a definitive answer regarding chunk size, so it’s recommended to explore further resources on the topic.

Methods for splitting text:
Text can be split using rule-based or machine learning-based models. Rule-based methods focus on character analysis, while machine learning-based models, like NLTK & Spacy tokenizers or advanced transformer models, depend on language-specific training, primarily in English. ML-based sentence splitters currently work poorly for most non-English languages and are computationally intensive, so starting with a simple rule-based splitter is recommended. A common and effective method is a recursive character text splitter used in LangChain or LlamaIndex, which shortens sections by finding the nearest split character in a prioritized sequence.

An example of using LangChain’s recursive character splitter is shown below:
– Define the tokenizer as the intended embedding model since different models may count words differently.
– Set a small chunk size and chunk overlap.
– Define a length function that counts the tokens using the tokenizer.
– Specify the separators in a prioritized order.
– Apply the text splitter to the formatted document.

After splitting the text, the next step is to embed these chunks for storage.



Source link

Tags: AlkestrupDecENGLISHImplementingJespermultilingualRAGSolution
Previous Post

Unlock the New Wave of Gen AI With Snowpark Container Services GPU-Powered Compute

Next Post

Complete Machine Learning In 6 Hours| Krish Naik

Related Posts

AI Compared: Which Assistant Is the Best?
Data Science & ML

AI Compared: Which Assistant Is the Best?

June 10, 2024
5 Machine Learning Models Explained in 5 Minutes
Data Science & ML

5 Machine Learning Models Explained in 5 Minutes

June 7, 2024
Cohere Picks Enterprise AI Needs Over ‘Abstract Concepts Like AGI’
Data Science & ML

Cohere Picks Enterprise AI Needs Over ‘Abstract Concepts Like AGI’

June 7, 2024
How to Learn Data Analytics – Dataquest
Data Science & ML

How to Learn Data Analytics – Dataquest

June 6, 2024
Adobe Terms Of Service Update Privacy Concerns
Data Science & ML

Adobe Terms Of Service Update Privacy Concerns

June 6, 2024
Build RAG applications using Jina Embeddings v2 on Amazon SageMaker JumpStart
Data Science & ML

Build RAG applications using Jina Embeddings v2 on Amazon SageMaker JumpStart

June 6, 2024
Next Post
Complete Machine Learning In 6 Hours| Krish Naik

Complete Machine Learning In 6 Hours| Krish Naik

Rustic Home Design Ideas You’ll Wish You’d Seen Sooner

Rustic Home Design Ideas You’ll Wish You’d Seen Sooner

How Do You Vertically Centre an Element in CSS? (Even More) Easily!

How Do You Vertically Centre an Element in CSS? (Even More) Easily!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Trending
  • Comments
  • Latest
Is C.AI Down? Here Is What To Do Now

Is C.AI Down? Here Is What To Do Now

January 10, 2024
Porfo: Revolutionizing the Crypto Wallet Landscape

Porfo: Revolutionizing the Crypto Wallet Landscape

October 9, 2023
A Complete Guide to BERT with Code | by Bradney Smith | May, 2024

A Complete Guide to BERT with Code | by Bradney Smith | May, 2024

May 19, 2024
A faster, better way to prevent an AI chatbot from giving toxic responses | MIT News

A faster, better way to prevent an AI chatbot from giving toxic responses | MIT News

April 10, 2024
Part 1: ABAP RESTful Application Programming Model (RAP) – Introduction

Part 1: ABAP RESTful Application Programming Model (RAP) – Introduction

November 20, 2023
Saginaw HMI Enclosures and Suspension Arm Systems from AutomationDirect – Library.Automationdirect.com

Saginaw HMI Enclosures and Suspension Arm Systems from AutomationDirect – Library.Automationdirect.com

December 6, 2023
Can You Guess What Percentage Of Their Wealth The Rich Keep In Cash?

Can You Guess What Percentage Of Their Wealth The Rich Keep In Cash?

June 10, 2024
AI Compared: Which Assistant Is the Best?

AI Compared: Which Assistant Is the Best?

June 10, 2024
How insurance companies can use synthetic data to fight bias

How insurance companies can use synthetic data to fight bias

June 10, 2024
5 SLA metrics you should be monitoring

5 SLA metrics you should be monitoring

June 10, 2024
From Low-Level to High-Level Tasks: Scaling Fine-Tuning with the ANDROIDCONTROL Dataset

From Low-Level to High-Level Tasks: Scaling Fine-Tuning with the ANDROIDCONTROL Dataset

June 10, 2024
UGRO Capital: Targeting to hit milestone of Rs 20,000 cr loan book in 8-10 quarters: Shachindra Nath

UGRO Capital: Targeting to hit milestone of Rs 20,000 cr loan book in 8-10 quarters: Shachindra Nath

June 10, 2024
Facebook Twitter LinkedIn Pinterest RSS
News PouroverAI

The latest news and updates about the AI Technology and Latest Tech Updates around the world... PouroverAI keeps you in the loop.

CATEGORIES

  • AI Technology
  • Automation
  • Blockchain
  • Business
  • Cloud & Programming
  • Data Science & ML
  • Digital Marketing
  • Front-Tech
  • Uncategorized

SITEMAP

  • Disclaimer
  • Privacy Policy
  • DMCA
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us

Copyright © 2023 PouroverAI News.
PouroverAI News

No Result
View All Result
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing

Copyright © 2023 PouroverAI News.
PouroverAI News

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In