Automatically translated.View original post

When the RAG we built...Fight life but we fight back! 🦾

A headache with the word "can't find information" when you put it in? 💢

It's not a coincidence, but it's technical!

Today, let's take a look at how to upgrade RAG to be smarter in a leap.

✅ Lost in the middle.

✅ measured with RAGAS to stop thinking that it's accurate.

✅ Upgrade to Modular RAG with a cool Logic Path.

Stack ready tool. The maker is ready (will sleep)! Who uses which one? Comment, let's talk. 👇

# programmer # Developer # selfdevelopment # Data ascience # learnonlemon8

1/20 Edited to

... Read moreในการใช้งาน Retrieval-Augmented Generation (RAG) หลายคนอาจเคยเจออาการ "หลงทางตรงกลาง" หรือข้อมูลบางส่วนในบริบทที่ใส่เข้าไปถูกละเลยซึ่งเกิดจาก LLM ไม่สามารถจำข้อมูลในช่วงกลางของบริบทได้อย่างถูกต้อง เทคนิคหนึ่งที่ผมใช้เองคือการเลือกขนาด Chunk ที่เหมาะสม (Small-to-Big Retrieval) โดยการค้นหาด้วยประโยคสั้นๆ แต่ดึงทั้งย่อหน้าของเนื้อหามาใช้ ทำให้ข้อมูลที่ส่งให้โมเดลครบถ้วนและแม่นยำกว่า อีกเทคนิคที่สำคัญคือ Modular RAG ที่เน้นการสร้าง Logical Path ซึ่งทำให้โมเดลสามารถประมวลผลข้อมูลเป็นลำดับขั้นตอน แยกความสำคัญและตรวจสอบข้อมูลได้ด้วยตัวเอง เช่น Self-RAG ที่ให้โมเดลตรวจสอบ context ของตัวเองว่าตอบคำถามได้จริงไหม และถ้ายังไม่พอจะกลับไปค้นหาอีกครั้ง ช่วยเพิ่มความแม่นยำและลดความผิดพลาดจากข้อมูลที่ไม่น่าเชื่อถือ สำหรับผู้ที่ต้องการวัดประสิทธิภาพของ RAG แบบเป็นระบบ การใช้ RAGAS Framework จะช่วยให้เราสามารถประเมินค่า Metrics เช่น Faithfulness, Answer Relevance, และ Context Precision ได้แบบอัตโนมัติ ช่วยลดการมโนว่าผลลัพธ์แม่นยำโดยไม่มีข้อมูลยืนยัน เครื่องมือยอดนิยมที่ผมแนะนำตอนเริ่มต้น เช่น LangChain สำหรับการจัดการ orchestration, LlamaIndex สำหรับการจัดการข้อมูล Retrieval แบบเฉพาะ และ Vector DB อย่าง Pinecone, Milvus และ ChromaDB ที่ช่วยเก็บและดึงข้อมูล vector ได้อย่างรวดเร็วและมีประสิทธิภาพ ด้วยการใช้เทคนิคและเครื่องมือเหล่านี้ร่วมกัน ผมพบว่า RAG ที่พัฒนาขึ้นสามารถตอบโจทย์การดึงข้อมูลจากฐานข้อมูลขนาดใหญ่ได้ดีขึ้นมาก ลดปัญหาการ "ข้อมูลหาไม่เจอ" ที่เคยเจอมา และยังช่วยให้ผู้ใช้งานสามารถพัฒนาระบบตอบคำถามด้วย AI ได้อย่างมั่นใจมากขึ้น ลองปรับใช้เทคนิคเหล่านี้ดูนะครับ จะช่วยให้การพัฒนา RAG ของคุณก้าวกระโดดขึ้นจริงๆ!

Related posts

we were together but drifting 👇
what scared me most was that we still loved each other. nothing dramatic had happened. we were just losing closeness through little choices we repeated every day. this was never about hiding real harm or not leaning on people you trust. it was about making small repaired fights the only story o
Camilla 💔 Dylan

Camilla 💔 Dylan

308 likes

I love this home we’ve built!
A few of my favorite before and afters of our home design I dreamt up. 🥰 #interiordesign #interiordesignideas #homedesign #homedesignideas #DIY #homeprojects #kitchenremodel #bathroomremodel #entrywaydesign #homeremodel
Astin Hancock

Astin Hancock

4749 likes

This is what I’m built for🚀💰#luxury #success #moti
This is what I’m built for🚀💰 #luxury #success #motivation #fyp
Yirah

Yirah

1985 likes

Sweet Dreams are made of this💤☁️👇🏻
I prioritize getting good sleep for my mental health, work ethic, and physical health. A lot of things determine quality sleep like temperature, personal preferences, and quality of comfort, but we often neglect our senses that have nothing to do with touch. I have to sleep in a dark room and t
cc 🍒🐆🍸🏳️‍🌈

cc 🍒🐆🍸🏳️‍🌈

2164 likes

A notebook with handwritten daily tasks for Wednesday and Thursday, next to a lit candle labeled 'Dreamer'. The text overlay reads 'what ACTUALLY makes habits stick !!'.
A person in white sports bra and teal shorts, viewed from behind, standing in a bedroom. The text overlay states 'visible progress matters' and 'when I see something working, I want to do more of it'.
A calendar open to July, showing dates and notes, with a lit candle nearby. The text overlay says 'streaks give you something to lose' and explains consistency becoming automatic.
my life changed when i realized this:
this is embarrassing to admit…but making good habits stick has always been SO hard for me. i’ll do well for a few days, even a week. i trick myself into thinking i’ve got it down, and then inevitably fall off every single habit and procrastinate doing anything positive for myself until i’m an anxio
carley ◡̈

carley ◡̈

428 likes

Two aged parchment scrolls display the poem 'Fight Together' by Severin Blackthorn on a wooden surface. A feather quill rests on the left scroll, and three lit candles glow on the right. The Lemon8 logo and author's handle are at the bottom.
Fight Together( First Draft)
#poetry #writertok #poetsoflemon8 #poetrycommunity
Severin Blackthorn

Severin Blackthorn

80 likes

A person in a brown athletic outfit stands with their back to the camera, highlighting the side glute area with an arrow. The text overlay reads, 'Do this to grow your Side booty,' indicating a focus on gluteus medius development.
A person in a gym performs 'Cable Curtsey step ups' on an elevated surface at a Smith machine. The text instructs to start with weight on the supporting foot, demonstrating the initial position of the exercise.
A person demonstrates the 'Cable Curtsey step ups' by hinging at the hips, extending one leg back in a curtsey angle, and lightly tapping the ground. Text indicates to engage the glute to lift and use zero momentum.
How I Built My Side Booty
Girls, if you want to build a booty, you better not neglect your gluteus medius- AKA side booty! I love this exercise currently because it seriously targets my sided booty like nothing else. It’s also amazing for the quad dominant girls because, if done properly, it really takes the work out of the
Delaney

Delaney

243 likes

A block-built figure, wearing a blue suit, white shirt, and red tie, with yellow hair, is shown from a side angle against an outdoor background with green fields and buildings.
The block-built figure, dressed in a blue suit with yellow hair, is viewed from a rear-side angle, set against an outdoor backdrop of green fields and distant buildings.
A block-built figure, featuring yellow hair, an orange face, a blue suit, white shirt, and red tie, is presented from a front-side view against a plain white background.
Just Built a Blocky Icon Right on Election Day! 🧱🇺🇸
Finished assembling this unmistakable figure just in time for the election buzz! Did I nail the look? 👀 Drop your thoughts below and hit follow for more fun builds! #BlockBuilder #ElectionVibes #IconicFigures #USATalk #TikTokTrends
Mr.Froger Toy

Mr.Froger Toy

428 likes

A person stands in a mirror, holding a drink, with text overlays about back-to-school hygiene tips for smelling good.
Various body care products are arranged on a pink towel, illustrating a daytime shower routine with steps like exfoliation, cleansing, and moisturizing.
Several body care products, including body washes, a dry brush, and a razor, are shown in a bathtub, outlining a night-time shower hygiene routine.
back to school hygiene tips YOU NEED TO KNOW SIS🎀
back to school hygiene tips YOU NEED TO KNOW ASAP🫧 how to smell & look good ALL DAY LONG! self care tips for girl✨ #hygieneessentials #hygieneroutine #bodycareroutine #beautyfinds #selfcareroutine
JAY ALEXIS🎀

JAY ALEXIS🎀

24 likes

DIY BUILT IN SHELVES
If I can do this, anyone CAN! I’ve been dreaming of doing something like this and talked about it for years. I LOVE how it turned out! I cannot wait to style these shelves! 😍 #diymakeover #builtinshelves #home #diyproject
Megan Flores

Megan Flores

25 likes

🍋✨When You’re Called to Be Her
🍋✨ Lemon8 Story: “When You’re Called to Be Her, But You’re Still Healing” Some days I feel like Deborah—wise, strong, fearless. Other days I feel like the girl crying in her room, trying not to text the wrong man back. But here’s what I’m learning in this walk with God: ⸻ 🪞 You can be bo
Dejah Taylor

Dejah Taylor

736 likes

DIY Built-In Bookshelf Project Part 2
Check out the next installment of our DIY Built-in bookshelf project that we completed in a weekend #diy #diyproject #home #bookshelf #fyp
Brandon Gentry

Brandon Gentry

19 likes

A hand holds an open book on a fluffy blanket, displaying text that compares '6'3 VS. 6'6' and a suggestive passage, implying a difference in physical attributes, with the caption 'YES, THERE'S A DIFFERENCE IYKYK'.
6’6 and built like a mountain… 🤭
There’s a first for everything you encounter. First time being at a wife swap First time meeting the man of my dreams at said wife swap First time being proposed to over the phone by the man you met at wife swap and traveling over seas to come to America to live with him and his daughter. And
shannell fisher

shannell fisher

765 likes

A charming wooden treehouse with a stone chimney, nestled in a large tree with a winding spiral staircase, surrounded by lush green foliage.
A spacious wooden treehouse built among several trees, featuring a large deck with a picnic table and benches, accessible by wooden stairs in a forest setting.
A whimsical, multi-level wooden treehouse structure with spiral stairs and decorative elements like large red mushrooms, set deep within a dense forest.
Actual adult treehouse you can have built to live
Moonkitten🐈‍⬛🌙

Moonkitten🐈‍⬛🌙

676 likes

A person stands in front of a mirror, showcasing their lower body in denim shorts. The image has a text overlay that reads, 'How I built my lower body,' serving as the title for the fitness content.
A person stands in a squat rack at a gym, with a barbell on their shoulders, accompanied by another person. The text overlay emphasizes, 'NEVER SKIP SQUATS,' and explains how consistent squatting led to muscle definition.
A close-up shot of a person's legs on a leg extension machine, wearing knee pads. The text overlay, 'LEG EXTENSIONS (YOU'RE NOT DOING THEM RIGHT),' provides detailed instructions for performing leg extensions using drop sets.
HOW I BUILT MY LOWER BODY 🦵
• I hate squats, and still do! It takes a lot of energy and I always get worried I’m going to hurt my back, I’d rather focus the weight on just my quad not my whole body! There are specific machines that serve that purpose but it’s important to do more than one exercise on big muscle groups (ex: ha
Livy🪐✨

Livy🪐✨

161 likes

A split image showing a woman's body transformation. The left side shows her before, thinner, in a grey sports bra and black shorts. The right side shows her after, with a curvier, more muscular physique, in a black long-sleeved top and leggings, taking a mirror selfie, illustrating a year of progress.
How I built my dream body ✨
****Genetics play a MAJOR role**** Growing up I was super thin. I desperately wanted to gain weight but I just couldn’t. It wasn’t until I started going to the gym and learning more about nutrition is when things really started changing. Here’s everything I did: 1) Went into a bulk. This
Katt

Katt

654 likes

We Built Our Dream Backyard!💚
This backyard has been 6-7 years in the making. We always plan to make it better each year! You should see it in August, its going to be so full, it’ll be awesome! Since it is still Spring, the produce plants are small. Yes it is full of weeds, but we don’t care about that. It’s genuine
Meghan

Meghan

51 likes

Relationship Advice For New Lovers. (Up To 1 Year)
When you're in the exciting early stages of a new relationship, everything feels fresh, thrilling, and full of potential! But let's be real—every new couple faces challenges. So, how can you keep that spark alive and navigate the tricky waters to make it to that one-year anniversary? 🌺 Here
ZINNIABEA SAGED

ZINNIABEA SAGED

103 likes

Can you tell WHERE I built my pumpkin home?
I love doing builds and things like that in Minecraft. Right now I'm trying to make a little village (its REALLY wonky, some is medieval, some is dark witch stuff, some pink cottagecore...) but when I opened the map, I couldn't stop laughing when I saw this picture....
Truromom4

Truromom4

8 likes

Not Everyone Gets a Soft Life — But We Still Rise
Some of us weren’t given soft lives — we were built in the fire and still found a way to bloom. 🌿 We carry others because we remember what it felt like to stand alone. We’re not here because it was easy — we’re here because we didn’t give up. 💫 #BloomAnyway #mentalhealthmatters #KeepGoing
HerDailyFight

HerDailyFight

2 likes

I BUILT MY DREAM HOME 🏠 ❤️
I’ve been working so hard to get to this point in life battling depression from becoming a new mom and work and all of life hurdles and I was finally able to do the things I set out to do all along. I BUILT MY DREAM HOME!!! Thru a builder Company named D.R. HORTON it was such a great experience I w
Janisha

Janisha

920 likes

Relationship built onna friendship..
#fyp #motivation #inspiration #quotes #relatable
HeartBreakHotel

HeartBreakHotel

75 likes

A collection of pink hair care products, including shampoo, a liquid mask, a leave-in treatment, and a spray, are displayed. The image highlights a protein routine for stronger, shinier hair, recommending professional products for breakage.
A hand holds a pink bottle of anti-breakage shampoo. Text emphasizes cleansing hair to remove dirt and oils for good hair days, with a tip to shampoo twice for full effect.
A hand holds a pink bottle of anti-breakage conditioner. The text describes it as making detangling easier and providing good slippage, with a tip that heavy conditioners can be skipped for a mask.
My In-Shower hair Routine for Stronger hair 🥰🍋
Curly, coily, color-treated, or chemically processed? If your strands scream “help!” when you brush them… you might need a protein boost 🧬. That’s where the Matrix Instacure Collection comes through like a hair hero! This whole line is infused with liquid proteins to help fight breakage, reinfor
Urstylistbestie

Urstylistbestie

57 likes

A flat lay image on a white desk featuring a jewelry box, a planner, an Apple Watch, and AirPods. Text overlay reads: 'How to Build Discipline Not Just Motivation' and 'Motivation Fades But Discipline Lasts'.
A graphic comparing 'Motivation' and 'Discipline'. Motivation is described as 'comes and goes, driven by feelings,' while Discipline 'shows up even when you don't feel like it.' It states that 'Relying on motivation is why most people fail.'
A graphic titled '#1: Set Non-Negotiables' with the main point 'DISCIPLINE STARTS WITH CLARITY'. It advises to 'DECIDE IN ADVANCE' and gives an example of a workout schedule.
DISCIPLINE IS BUILT WHEN YOU DON’T FEEL LIKE IT
🔥 DISCIPLINE IS BUILT WHEN YOU LEAST FEEL LIKE SHOWING UP. 🔥 We’ve all been there—you say you’ll start Monday… but when Monday comes, you’re “not in the mood.” If you only show up when you feel like it, you’ll never get anywhere. Real progress happens when you push through, even on the hard d
Ina 🤍

Ina 🤍

9 likes

A young woman with long brown hair and eye patches that say "BOLDE" and "BOLD6" on her cheeks. She has a neutral expression. A blue text overlay reads: "Unhinged mental health hacks i learned from therapy (That no one talks about)".
A hand holds a pile of colorful, sugar-coated sour candies. A yellow star icon and blue text overlays describe eating something sour to snap out of panic, as it's grounding and fast-acting.
A stovetop is covered in white cleaning foam, with a white spray bottle labeled "AZELIT" in the background. A yellow star icon and blue text overlays suggest going on a cleaning binge to release tension and enjoy a clean space.
sounds super cringe but helpful when you spiral
save for your next spiral. my biggest learning was to track my progress in a long term journal to see how far I’ve come. I use the journee app for doing a voice brain dump mid spiral and for tracking my moods but you can use whatever system you like. what you want to collect is a) evidence that you
journee

journee

13 likes

A motivational poster set against a serene beach background with ocean waves and sand. The text reads 'THIS IS YOUR WAKE-UP CALL', urging action and commitment to goals, with phrases like 'NO MORE EXCUSES NO MORE HESITATION' and 'The clock is ticking. The choice is yours.'
READ THIS WHEN YOU FEEL LIKE GIVING UP!
Let’s be real life is heavy. Bills stack up. People let you down. Dreams feel further than ever. And some days, the weight makes you want to quit. But here’s the truth nobody tells you: Quitting won’t make the pain disappear it just erases the possibility of victory. Every time you keep goin
I Am Feeling Good

I Am Feeling Good

17 likes

A mirror selfie of a person wearing a grey crop top and black sweatpants, with text overlay "MOMENTS THAT MADE ME EMOTIONALLY DETACH" and various emojis.
A close-up of a bowl of ramen with text overlays describing unmet expectations, lack of surprise dates, and thoughtful gifts in a relationship.
An outdoor scene with a road and a building, featuring text overlays about a partner's lack of future plans and removing the person as their phone wallpaper.
- When does love stop feeling like love?❤️‍🩹
I didn’t detach from my previous relationship overnight. It wasn’t one explosive fight or one mistake that made me pull away. It was a collection of small moments that built up until I felt more like a bystander than a partner. It was realizing I expected things from him that he wasn’t w
Brooke˚₊‧♡ ‧₊˚

Brooke˚₊‧♡ ‧₊˚

14 likes

Not everything is within our control, but how we respond is
Good morning and happy Tuesday, friends! Life will always bring moments that test us. There will be setbacks, disappointments, unexpected challenges, and seasons where things feel heavier than we hoped. In those moments, we all have a choice to make. We can let the weight of our circumstances de
ajbaum10

ajbaum10

1 like

We Reign in Silk
You kiss me slow like ancient gold, our skin like stories never told. In gardens built from love and light, we rule the stars without a fight. No thrones of pain, no crowns of fear— just soft and sacred, crystal-clear. We reign in silk, in honeyed breeze, Black love that bends the world wi
𝐸𝓂𝓅𝓇𝑒𝓈𝓈 𝒩𝒶𝒻𝒾𝓈𝒶👑

𝐸𝓂𝓅𝓇𝑒𝓈𝓈 𝒩𝒶𝒻𝒾𝓈𝒶👑

19 likes

A person in a black sports bra and pink shorts takes a mirror selfie, with the text overlay "HOW I FINALLY BUILT CONFIDENCE" serving as the article's title card.
A person stands next to a spin bike in a spin class with red walls, illustrating the tip "- I started doing things I normally wouldn't do -".
A person takes a mirror selfie in a gym, wearing workout clothes and headphones, representing the tip "- I started focusing on MY fitness goals -".
finally BUILT confidence
✨ How I finally built confidence ✨ Building confidence can be a rollercoaster 🎢 but a beneficial rollercoaster. To help with my confidence I followed these tips: 💭 • I started doing things I normally don’t do 🙈 SOUNDS SCARY RIGHT!? Well it is. It takes a lot to step into a box you’ve n
everythingtrin 🫦

everythingtrin 🫦

172 likes

Garden Finds | Her husband built her this
Her husband built her the greenhouse of her dreams..by using old windows and doors! Wow! #garden #gardenfinds #dreamgarden
Kiara’s Finds

Kiara’s Finds

33 likes

We built a mental health app if you didn’t know 😋
Every single one of us has struggled with mental illness ourselves or watched a love one fight through it. This isn't therapy or professional help (AND IT DOESN'T REPLACE IT). We just know how suffocating the hard days are especially when you feel you are drowning in silence. We made Letheia becau
Emma

Emma

1 like

How I built my shelf 🍑
#gluteshelf #gluteworkout #howtobuildglutes #glutegains #glutetransformation
Danielle

Danielle

28 likes

A woman in a black long-sleeve top and red shorts takes a mirror selfie in a gym locker room. The image has text 'SCREENSHOTS EVERY GYM GIRL NEEDS' and a 'Swipe Lemon8' logo.
A woman in a black top and yellow shorts, wearing white headphones, takes a mirror selfie next to a pink and purple tanning booth. A 'Lemon8' logo is visible.
An infographic illustrates leg press foot placements (wide, narrow, high, low stance) and their corresponding muscle activation for inner thigh, outer thigh, hamstrings, glutes, and quadriceps.
BUILT not BOUGHT 💞
Never give up ✨ #gymbuddyideas #remember youre a gym baddie #gymshark😈 #gymgirl🖤 #gymgirlpower
Clarissa Janelle 💗

Clarissa Janelle 💗

10 likes

A woman takes a mirror selfie, showcasing her lean physique in a black sports bra and leggings. The image features text overlay: 'How to achieve the LEAN MUSCLE MAMÍ Physique,' along with the Lemon8 logo and username.
A woman's torso in a black sports bra and leggings, illustrating a strategic workout split. Text details include 3 days of lifting, 3 days of Pilates or Lagree, 2 cardio sessions, and 1 day of rest.
Three drinks on a dark table, accompanied by text listing items to 'LIMIT OR AVOID:' including Alcohol, Refined sugar, Refined grains, and Fried foods, as part of a healthy lifestyle.
How I Built my Dream Body 💪🏼
Ladies, I have literally never been so happy with my physique as I am now! I do NOT believe in gatekeeping so this is exactly what I do to maintain my lean muscle mamí physique… it’s giving gym rat meets pilates princess. 1. My workout split is very strategic. I do leave room for extra pilates w
Delaney

Delaney

12 likes

Yes we had ALL OF THEM
#relationships #couplegoals #relationshipadvice #anxiousattachment #couples
Camilla 💔 Dylan

Camilla 💔 Dylan

1 like

An illustration depicts a man and a woman lying in bed, back-to-back, appearing sad or contemplative. The title "When Love Gets Quiet..." is at the top, reflecting a moment of silence and distance in a relationship.
A text image on a black background displays the beginning of a poem titled "When Love Gets Quiet," describing the heavy silence after a conflict and the emotional distance between two people in bed.
A text image on a black background presents the middle section of the poem, discussing replaying arguments, ego-driven cracks in a relationship, and love hiding, waiting for partners to remember their bond.
When Love Gets Quiet…
Ain’t nobody talking, but we both feel it. That silence that hits harder than yelling ever could. #poetry #spokenpoetry #love
Kadijah

Kadijah

672 likes

Healthy Habits Are Built One Step At A Time
At 12, I faced scoliosis surgery from T4 to L2 and L4 to S1. It was challenging, but every challenge taught me resilience. Keep believing in your strength. Patients with a growth mindset often express themselves in ways that reflect their belief in the ability to improve their health through eff
🌸Gen✨𖥔 ′ ⩇⩇:⩇⩇ ⋆☾⋆⁺₊ ✧

🌸Gen✨𖥔 ′ ⩇⩇:⩇⩇ ⋆☾⋆⁺₊ ✧

6 likes

See more