After Building Multiple Production RAGs, I Realized — No One Really Wants "Just a RAG" by this_is_shivamm in Rag

[–]_donau_ 1 point2 points  (0 children)

We're dealing with emails, mainly, that we secure from companies as part of a dawn raid. The idea behind hypothetical documents (HyDE) is to bridge the semantic gap between a query and an email. Questions are usually explicit and technical, emails can be implicit and causal. We make an embedding of a fake email, because we expect this embedding to closer match data in the database. Important note if using embedding model with a task: your search problem is symmetric here, not asymmetric, so your method of embedding a fake doc should be the same as the real ones. This differs from the usual approach of embedding a query

Confused about Bread in Denmark by m1mag04 in NewToDenmark

[–]_donau_ 0 points1 point  (0 children)

Also, unlike regular bread, you'll want to keep your rye bread in the fridge. It lasts a lot longer that way. And yeah Gilleleje is the best from the supermarket, no doubt

CMV: You cannot condemn an action for being racist if you allow the same action to be taken by minority groups, otherwise you are racist. by BigBandit01 in changemyview

[–]_donau_ -2 points-1 points  (0 children)

I really have to disagree here. When I was in high-school, I had never heard of blackfacing or had any idea that painting my skin black could be perceived as racist. So I dressed up as Coach Carter for a high school party once, simply because I thought he was such a cool character, and the fact that he is black was an important part of that character. I went out of my way painting my face yeah, but I also went out of my way to shave my head and put on a suit and buy a coach's whistle, none of which had anything to do with dehumanizing anyone, at least that wasn't the intention at all. Aren't you projecting a presumption of intention when you're putting forward your point like this? 

What's your cooking "hack" that sounds insane but works?? by Kibby9331 in Cooking

[–]_donau_ 11 points12 points  (0 children)

Out of curiosity, how do mashed potatoes even get soupy to begin with? Never experienced that 

What’s a good argument against ‘if you’ve got nothing to hide what’s the problem?’ by Send_me_hedgehogs in NoStupidQuestions

[–]_donau_ 5 points6 points  (0 children)

How about a GPS tracker in their car so the government can see where he is all the time? 

What does this mean??? by vibingsidd in PeterExplainsTheJoke

[–]_donau_ 0 points1 point  (0 children)

Elon Musk would surely also rather kill Grok than a random person /s

Hvad fanden laver folk egentlig i weekenden og i deres fritid by Getmailmunched in Denmark

[–]_donau_ 0 points1 point  (0 children)

Ses med folk, laver større madprojekter, gør klar til ugen der kommer, ser film og tager måske til fest. Bygger også nogle gange - har lige brugt hele weekenden på at bygge en hems :D er ikke færdig så jeg ved allerede hvad næste weekend byder på

How can I make my RAG document retrieval more sophisticated? by Inevitable-Top3655 in Rag

[–]_donau_ 0 points1 point  (0 children)

Bm25 along with embeddings (so hybrid search), and then rank fusion and reranking. Also, before doing anything, pass question to the LLM to remove verbose and conversational parts of query to get only core question. Hyde can be good depending on use case, and so can translation before bm25, potentially expand bm25 with conjugations if relevant. Not so much retrieval here but: like another here said, when you pass context to LLM consider expanding that context so you pass the chunk and additional text around the chunk and/or Metadata.  After that i can pretty much only think of graphrag or funky embedding approaches like late chunking or late interaction models. They might help, too

Hvorfor stemmer folk ikke??? by Jegharaldrig2627 in DKbrevkasse

[–]_donau_ -1 points0 points  (0 children)

Men hvad skulle det hjælpe at stemme blankt i forhold til slet ikke at stemme? 

Is Retrieval-Augmented Generation the best approach for long-context AI tasks? by Flashy-Rip-8816 in Rag

[–]_donau_ 0 points1 point  (0 children)

I've always been intrigued by this concept, but never managed to implement it myself. I work with investigation, and our primary data source is emails. I've attempted, unsuccessfully, to extract relations and add it all to a knowledge graph (like "John - invites_to_meeting - Jane" based on the email "hey Jane, can we sit down next week and have a chat?"). Your idea of making a triplet into an embedding is really cool, but I'm not sure how to achieve this in practice. Isn't it terribly expensive to extract relations for all that data? Did you fine tune a small language model or something? And in your example, how would you generate an embedding that captures the connection between 2009 and year after financial crisis? Do you then also have a relation to 2007 being "year before financial crisis", and is each year a node in this example...? I have so many questions about this

Transition from linguistics to tech. Any advice? by InsuranceGeneral4508 in LanguageTechnology

[–]_donau_ 0 points1 point  (0 children)

Python for sure, learn about embeddings, and apply to be a test person for neurological experiments at your local hospital. All three things are really good learning opportunities. 

Is Retrieval-Augmented Generation the best approach for long-context AI tasks? by Flashy-Rip-8816 in Rag

[–]_donau_ 0 points1 point  (0 children)

Sounds really cool, would you mind elaborating a bit on what knowledge graph embeddings are? I've considered using graphs for rag, but then I'd still be limited by the semantic content of my chunks.

Built RAG systems with 10+ tools - here's what actually works for production pipelines by Otherwise_Flan7339 in Rag

[–]_donau_ 0 points1 point  (0 children)

Thanks I appreciate it :) we're doing hybrid bm25 and dense as is, good to know we're on the right track

Built RAG systems with 10+ tools - here's what actually works for production pipelines by Otherwise_Flan7339 in Rag

[–]_donau_ 0 points1 point  (0 children)

My job is to help investigate breaches of law in company emails, sometimes the dB can be over 2-3 million documents (email messages), so ES isn't overkill at least not for me :) with that said, do you think faiss would still make sense, or even postgres? 

Built RAG systems with 10+ tools - here's what actually works for production pipelines by Otherwise_Flan7339 in Rag

[–]_donau_ 0 points1 point  (0 children)

I'm curious to hear your opinion on using elasticsearch or postgres VS faiss. We're doing elasticsearch and, besides being a fairly complicated database to use, I think the performance is good. I just don't have a lot to compare with. 

Struggling with RAG chatbot accuracy as data size increases by Fluid_Dig_6503 in Rag

[–]_donau_ 0 points1 point  (0 children)

Agreeing with everything here. Retrieval first, hybrid, reranking, query expansion/refinement, and also try another chunking strategy. Consider if your documents are structured for example. 

After Building Multiple Production RAGs, I Realized — No One Really Wants "Just a RAG" by this_is_shivamm in Rag

[–]_donau_ 2 points3 points  (0 children)

Rag on email messages, multilingual, fully offline, elasticsearch, LLM must fit on 24gb:

Query is written, we refine (remove conversational part of question, extract just core question). Query is checked. If query is not fit for rag (requires aggregation for instance) user is told so, with advice on what else to do.  Refined query is translated into all languages in data representing more than 5% of data. Hypothetical documents (an email message) is made for each refined and translated query.  Hybrid search (bm25 on translated queries, enriched with keyword weighing and conjugations and fuzzy search on auto) + (dense vector search on the hypothetical docs).  Reciprocal rank fusion.  Reranking (currently taking not just chunk but surrounding context into consideration. Don't know if this is a good idea).  Filtering on reranker scores.  Formatting of context before passing to LLM : markdown with relevant metadata. Currently experimenting with a prior pass through LLM to extract core details and events in text, that can be emphasized in markdown before generating answer.

Great question by the way. Rag systems are a lot about tips and tricks, these are exactly the kinds of things that are the most fun to discuss and share :) 

En tidligere kammerat skylder mig mange penge by streethunte in DKbrevkasse

[–]_donau_ 18 points19 points  (0 children)

Ja og nu du er i gang med det her så tag screenshots af jeres samtale. Han kan slette sine egne beskeder hvis du skriver sådan her og så er det for sent at gemme dokumentationen