Slim KTARI

500 posts

Slim KTARI banner
Slim KTARI

Slim KTARI

@SlimKtari

Software Architect | Passionate about .NET and AI 💜 | Technical Writer 👉 https://t.co/tlYyIwiCFX 👈

Paris, France Katılım Şubat 2011
361 Takip Edilen55 Takipçiler
Slim KTARI
Slim KTARI@SlimKtari·
I wrote down 10 things I learned (often the hard way 😅) while building LLM-powered apps. Just lessons I wish I knew earlier, maybe they’ll save you time. 👉 slimktari.com/10-lessons-i-l… #LLM #AI
English
0
0
1
17
Slim KTARI
Slim KTARI@SlimKtari·
🚀 𝗧𝗮𝗸𝗲 𝗼𝗻 𝘁𝗵𝗲 𝗠𝗶𝗰𝗿𝗼𝘀𝗼𝗳𝘁 𝗔𝗜 𝗦𝗸𝗶𝗹𝗹𝘀 𝗙𝗲𝘀𝘁! Try to get the GUINNESS WORLD RECORDS™! 👉 A great opportunity to stay up to date with AI 📅 Starting April 8, – 50 days to learn about AI. register.aiskillsfest.microsoft.com #AI #Microsoft #AITraining
English
0
0
0
12
Slim KTARI retweetledi
CERT-FR
CERT-FR@CERT_FR·
⚠️Alerte CERT-FR⚠️ La vulnérabilité CVE-2024-21413 affecte Microsoft Outlook. Elle permet a un attaquant de récupéré le condensat NTLM et potentiellement d'exécuter du code arbitraire à distance. Une preuve de concept partielle est disponible. cert.ssi.gouv.fr/alerte/CERTFR-…
Français
5
82
153
25.1K
Slim KTARI
Slim KTARI@SlimKtari·
Insightful breakdown of RAG optimization strategies, from the basics to advanced techniques – a valuable asset for those exploring this domain! #AI #MachineLearning #RAGoptimization #RAG
shyamal@shyamalanadkat

here are some basic → advanced strategies that I see for optimizing RAG implementations these days: basic 1. using effective prompt eng, templating, and conditioning. eg: “given the context information and no prior knowledge, answer the query..” etc. ok, we've all done some pretty aggressive prompt engineering. 2. understand the challenges: don’t overoptimize and first really identify common issues with retrieval, augmentation, and generation. you always want to start simple. simplicity is sexier. 3. choose the right chunk size: determine the optimal chunk size for your data to ensure efficient processing and retrieval. chunk overlaps don't always work; use smaller chunks? 4. using summaries for data chunks: apply summarization techniques to data chunks to provide the model with a concise representation of the information 5. data, data, and data: carefully managing, scrutinizing, versioning, and cleaning data sources and pipelines. quality > quantity. garbage data, garbage r-a-g. 6. evaluating retrieval: this can include 1/assessing retrieval performance by measuring the proportion of relevant documents retrieved (precision) and all relevant documents retrieved (recall) and 2/ integrating human-in-the-loop evals/feedback and basic evaluations. think about use-case-specific evaluation metrics. 7. evaluating generation: evaluating faithfulness and answer relevancy using something like ragas or a custom-built eval framework. 8. the enlightening realization that you don't always need a vector db or just appreciate simpler options like pgvector intermediate 1. metadata filtering: adding meta-data to the chunks to help process results. remember: similar ≠ relevant. this could also include filtering by relevancy. be careful about metadata, tho. 2. managing embeddings: strategies to handle frequently updated or newly added documents; challenges include incremental indexing and dynamic document ranking. 3. trustworthiness: using citations/attributions and employing techniques such as confidence estimation, uncertainty quantification, and error analysis to ensure the accuracy and trustworthiness of the generated content; sooner or later, thinking about "answerable probability" + "I don’t know" problems for retrieval. 4. leverage hybrid search techniques or other index types: integrate different search techniques, such as keyword-based and semantic searches (eg: bm25). again, similar != relevant for your use case. 5. apply query transformations: modify the user's query to better match the information needed from the data sources. users don’t always know what they want. query transformations can include strategies like hypothetical document embeddings which take a query, generate a hypothetical response, and then use both for embedding lookup 2/ decomposing the original query into multiple sub-queries or questions and 3/ iteratively evaluating query for missing information, and generate response once all information is available. 6. trade-offs: considering trade-offs between precision, recall, computation/cost to optimize the retrieval and generation process 7. advanced chunking strategies: experiment with different chunking strategies, such as sentence window retrieval and auto-merging retrieval to improve precision and relevance; there's a lot here? 8. re-ranking: re-rank (reordering the retrieved documents) the retrieved documents based on their relevance to the user's query. you can also combine multiple retrieval techniques and reranking strategies to improve the overall performance. advanced 1. fine-tune the model and/or the embeddings: either continue the training process on a smaller, more specific dataset to optimize performance or fine-tune to better represent the relationships between data points. fine-tuning on domain-specific datasets can sometimes help the generator understand the context the retriever provides. 2. customize embeddings using labeled training data: the approach involves creating a matrix that you can use to multiply your embeddings. the product of this multiplication is a 'custom embedding' that will better emphasize aspects of the text relevant to your use case." 3. query routing: have more than one index or tool then route sub-queries to the appropriate index or tool/function call. 4. multi-retrieval: combining the results from multiple retrieval (and generator?) agents to improve the overall quality and fidelity. 5. contextual compression and filtering: apply compression techniques to reduce the size of the context while preserving its relevance, and use filtering to select the most relevant information for the model 6. self-querying: use the model's output as a query to retrieve more information, which can be combined with the initial response to generate a more truthful answer 7. document hierarchies and knowledge graphs: use document hierarchies and knowledge graphs to improve the organization and retrieval of information. this could also include combining the strengths of both knowledge graphs with vector db. I’ve also seen folks leveraging knowledge graphs to improve the interpretability/explainability. let's go build.

English
0
0
0
38
Slim KTARI retweetledi
Alex Xu
Alex Xu@alexxubyte·
How do we transform a system to be Cloud Native? The diagram below shows the action spectrum and adoption roadmap. You can use it as a blueprint for adopting cloud-native in your organization. For a company to adopt cloud native architecture, there are 6 aspects in the spectrum: 1. Application definition development 2. Orchestration and management 3. Runtime 4. Provisioning 5. Observability 6. Serverless Most companies start from Step 1 containerization and gradually adopt CI/CD, service orchestration. This microservice architecture significantly increases the number of instances to manage, so systematic testing and monitoring are required to increase plant observability. In fact, a lot of companies stop at Step 4 without moving to service mesh and cloud-native networking due to the complexity and the required DevOps talent. Over to you: Where does your system stand in the adoption roadmap? Reference: Cloud & DevOps: Continuous Transformation by MIT Redrawn by ByteByteGo – Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/3KCnWXq
English
18
190
776
151.4K
Slim KTARI retweetledi
Alex Xu
Alex Xu@alexxubyte·
Made a simple visual guide to help everyone understand the key considerations when designing or using caching systems. - What is a cache - Why do we need cache - Where is cache used - Cache deployment - Distributed cache - Cache replacement and invalidation - Cache strategies - Caching challenges - And more. – 📩 We will write more in-depth articles on these topics. Subscribe to our newsletter so you won't miss out: bit.ly/3KCnWXq
Alex Xu tweet media
English
8
269
1.1K
122.1K
Slim KTARI retweetledi
javinpaul
javinpaul@javinpaul·
Design pattern to write better code
javinpaul tweet media
English
116
1.6K
8.1K
0
Majid Hajian 💙
Majid Hajian 💙@mhadaily·
Th first #flutter community swag boxes are ready to be sent! You might be one of them was to receive it!
Majid Hajian 💙 tweet media
English
23
8
125
0