Hiệp Nguyễn Tuấn
0 followers · 1 following · 846 views
on the atlas — 30
- Beyond “People Also Liked”: Building Intelligent Food Recommenders with LLMs | by Faisal Hussain Sabir | Aug, 2025 | Medium1 savers
- smry1 savers
- How to build production-ready Recommender Systems1 savers
- Agentic GraphRAG for the real-world1 savers
- Build your own newsfeed | Inoreader1 savers
- Inoreader - 2. Understanding Foundation Models2 savers
- Time Series — From Analyzing the Past to Predicting the Future | by Farzad Nobar | Towards Data Science1 savers
- How This 17-Year-Old Quietly Built a $1.12M/Month AI App | by Jano le Roux | The Startup | Dec, 2024 | Medium1 savers
- AI Agents: How to build Digital Workers | by Alfredo Sone | Nov, 2024 | Medium1 savers
- New page1 savers
- Advanced Retriever Techniques to Improve Your RAGs | Towards Data Science1 savers
- OmniVision-968M: The World’s Most Compact and Smallest Multimodal Vision Language Model for Edge AI | by Md Monsur ali | Nov, 2024 | Level Up Coding1 savers
- Advanced Prompt Engineering for Reducing Hallucination | by Bijit Ghosh | Medium1 savers
- contents | Build a Large Language Model (From Scratch)1 savers
- Preface | Hands-On Large Language Models1 savers
- RLHF: Reinforcement Learning from Human Feedback9 savers
- Anthropic’s New RAG Approach. If you want a more detailed article… | by Barhoumi Mosbeh | Sep, 2024 | Towards AI1 savers
- Scaling RAG from POC to Production | by Anurag Bhagat | Oct, 2024 | Towards Data Science1 savers
- 5. Prompt Engineering | AI Engineering1 savers
- Adding Long-Term Memory to a chatbot with Mem0 | by Rajesh Nayak | Oct, 2024 | Medium1 savers
- I used OpenAI’s o1 model to develop a trading strategy. It is DESTROYING the market | by Austin Starks | Sep, 2024 | DataDrivenInvestor1 savers
- The Portfolio that Got Me a Data Scientist Job | by Matt Chapman | Towards Data Science1 savers
- When (not) to Use GraphRAG. What is GraphRAG, and when should you… | by Louis-François Bouchard | Aug, 2024 | Towards AI1 savers
- How to Choose the Right Chunking Strategy for Your LLM Application | MongoDB1 savers
- 3 Advanced Document Retrieval Techniques To Improve RAG Systems | by Ahmed Besbes | Towards Data Science1 savers
- Building A RAG Pipeline for Semi-structured Data with Langchain - Analytics Vidhya1 savers
- What’s The Story With HNSW?. Exploring the path to fast nearest… | by Ryan McDermott | Towards Data Science1 savers
- Understanding HNSW: The Hierarchical Navigable Small World for Efficient ANN Searching | by AI SageScribe | Medium1 savers
- 6. RAGs and Agents | AI Engineering1 savers
- What Nobody Tells You About RAGs | Towards Data Science2 savers
highlights — 108
The idea is simple: feed the model a user query or profile (purchase history, past interactions, etc.), then instruct it to output the top-k most related items. Given access to the full corpus of items, the LLM can retrieve the most related items directly.
smryThe new approach is Generative Information Retrieval (GenIR). Instead of relying on keyword or vector similarity, we directly use an LLM to generate the titles or identifiers (DocIDs) of relevant items.
smryRetrieval is the first stage in both search and recommendation engines. The retrieval engines usually return tens or hundreds of items, selected from millions or even billions of products, and the ranker decides the final order presented to the user.
smrySampling is how a model chooses an output from all possible options.
Inoreader - 2. Understanding Foundation ModelsIn general, however, differences in foundation models can be traced back to decisions about training data, model architecture and size, and how they are post-trained to align with human preferences.
Inoreader - 2. Understanding Foundation ModelsInformation Extraction
5. Prompt Engineering | AI EngineeringIndirect prompt injection
5. Prompt Engineering | AI EngineeringDirect manual prompt hacking
5. Prompt Engineering | AI EngineeringJailbreaking and Prompt Injection
5. Prompt Engineering | AI EngineeringProprietary Prompts and Reverse Prompt Engineering
5. Prompt Engineering | AI EngineeringDefensive Prompt Engineering
5. Prompt Engineering | AI EngineeringOrganize and Version Prompts
5. Prompt Engineering | AI EngineeringA common approach to automating prompt generation is to use AI models. AI models themselves are capable of writing prompts.10 In its simplest form, you can ask a model to generate a prompt for your application, such as “Help me write a concise prompt for an application that grades college essays between 1 and 5”. You can also ask AI models to critique and improve your prompts or generate in-context examples. Figure 5-7 shows a prompt written by Claude 3.5 Sonnet (Anthropic, 2024).
5. Prompt Engineering | AI EngineeringEvaluate Prompt Engineering Tools
5. Prompt Engineering | AI EngineeringIterate on Your Prompts
5. Prompt Engineering | AI EngineeringThink step by step before arriving at an answer.
5. Prompt Engineering | AI EngineeringGive the Model Time to Think
5. Prompt Engineering | AI EngineeringBreak Complex Tasks into Simpler Subtasks
5. Prompt Engineering | AI EngineeringProvide Sufficient Context
5. Prompt Engineering | AI EngineeringSpecify the output format
5. Prompt Engineering | AI EngineeringAsk the model to adopt a persona
5. Prompt Engineering | AI EngineeringExplain, without ambiguity, what you want the model to do
5. Prompt Engineering | AI EngineeringWrite Clear and Explicit Instructions
5. Prompt Engineering | AI EngineeringPrompt Engineering Best Practices
5. Prompt Engineering | AI EngineeringContext Length and Context Efficiency
5. Prompt Engineering | AI EngineeringSystem Prompt and User Prompt
5. Prompt Engineering | AI EngineeringIn-Context Learning: Zero-Shot and Few-Shot
5. Prompt Engineering | AI Engineering1. Univariate Statistical Methods 1.1. Simple Exponential Smoothing 1.2. Holt’s Linear Trend 1.3. Holt-Winters Seasonal 1.4. AutoRegressive Integrated Moving Average (ARIMA) 1.5. Seasonal AutoRegressive Integrated Moving Average (SARIMA) 2. Multivariate Statistical Methods 2.1. Vector Autoregressive (VAR) 3. Machine Learning Approaches 3.1. Random Forest 3.2. Extreme Gradient Boosting (XGBoost) 4. Deep Learning Methods 4.1. Long Short-Term Memory (LSTM) 4.2 Gated Recurrent Unit (GRU)
Time Series — From Analyzing the Past to Predicting the Future | by Farzad Nobar | Towards Data ScienceThe anatomy of an agent To understand how agents work and why they’re so powerful, let’s explore their core components:
AI Agents: How to build Digital Workers | by Alfredo Sone | Nov, 2024 | MediumMethod: Contextual Compression Retriever (Reranking)
Advanced Retriever Techniques to Improve Your RAGs | Towards Data ScienceMethod: Self Query Retriever
Advanced Retriever Techniques to Improve Your RAGs | Towards Data ScienceMethod: Parent Document Retriever
Advanced Retriever Techniques to Improve Your RAGs | Towards Data ScienceMethod: Naive Retriever
Advanced Retriever Techniques to Improve Your RAGs | Towards Data ScienceTry the simple method first If you are not sure which RAG method is the best for your problem, try the simple method first. A good starting method is the RAG with BM25 retrieval method. The BM25 retrieval method is simple, efficient, and effective for many problems. BM25 algorithm is a keyword-based retrieval algorithm, some of the following tips can help you improve the performance of the BM25 algorithm: Remove the stop words. Use the stemming algorithm. Convert the text to lowercase. Extract and using the keywords from text. Generate variants of search queries and documents, i.e., synonyms, …
New pageA language model encodes statistical information about language. For simplicity, statistical information tells us how likely something (e.g. a word, a character) is to appear in a given context. The term token can refer to a word, a character, or a part of a word (like -tion), depending on the language model. You can think of tokens as the vocabulary that a language model uses.
RLHF: Reinforcement Learning from Human FeedbackPhase 1. Pretraining for completion
RLHF: Reinforcement Learning from Human FeedbackThis will generate contextual information for each chunk. You combine the given chunk with the relevant contextual information, and then you pass it through an embedding model. Those embeddings are going to be stored in a standard vector database. On the other hand, we also update the BM25 indexing. In this case, we’re using TF-IDF, which stands for Term Frequency Inverse Document Frequency. This is basically the keyword-based search mechanism. As a result, in each of the chunks, you are adding 50 to 100 tokens. I think you can already see some potential issues with this approach. One of them …
Anthropic’s New RAG Approach. If you want a more detailed article… | by Barhoumi Mosbeh | Sep, 2024 | Towards AI{{WHOLE_DOCUMENT}} Here is the chunk we want to situate within the whole document {{CHUNK_CONTENT}} Please give a short succinct context to situate this chunk within the overall document for the purposes of improving search retrieval of the chunk. Answer only with the succinct context and nothing else
Anthropic’s New RAG Approach. If you want a more detailed article… | by Barhoumi Mosbeh | Sep, 2024 | Towards AIAdding Long-Term Memory We have been using multiple options in the past to provide our chatbots with “long term memory”. A couple of common solutions are: Option 1: Persist or save the entire chat conversation session to a file or database. When the user starts a new session for the same chat conversation, load the previous session(s) details, append it to the prompt and send it off to the LLM. Option 2: Summarize the entire chat conversation session and then persist or save the summary to a file or database. When the user starts a new session for the same chat conversation, load the summary o…
Adding Long-Term Memory to a chatbot with Mem0 | by Rajesh Nayak | Oct, 2024 | MediumSemantic In this technique, documents are split based on semantic similarity. Documents are first split into sentence groups of three sentences using a sliding window. Embeddings are generated for each sentence group, and similar groups in the embedding space are merged to form chunks. The similarity threshold for merging is determined using metrics such as percentile, standard deviation, and interquartile distance. As a result, the chunk size can vary across chunks. While this method is more computationally expensive than the ones above, it can be useful for chunking documents where the conte…
How to Choose the Right Chunking Strategy for Your LLM Application | MongoDBRecursive Python splitter with overlap Since the PEPs contain some Python code snippets, we will also include a Python-specific chunking technique in our evaluation. This technique is the same as recursive with overlap, except the character list for splitting also includes Python-specific separators such as \nclass, \ndef, etc.
How to Choose the Right Chunking Strategy for Your LLM Application | MongoDBRecursive with overlap In this technique, we first split the documents by a parameterized list of characters such as \n\n, \n, etc., and then recursively merge characters into tokens using a tokenizer as long as the chunk size (in terms of the number of tokens) is less than the specified chunk size. This has the effect of trying to keep all paragraphs (and then sentences, and then words) together as long as possible, as those would generically seem to be the strongest semantically related pieces of text.
How to Choose the Right Chunking Strategy for Your LLM Application | MongoDBFixed token with overlap In this technique, we split documents into chunks with a fixed number of tokens, with some token overlap between chunks. Chunk overlap ensures that contextual information at the boundaries of chunks is not lost during chunking, thus improving the chances of the right information being retrieved during semantic search even if it spans across multiple chunks.
How to Choose the Right Chunking Strategy for Your LLM Application | MongoDBFixed token without overlap In this technique, we split the documents into chunks with a fixed number of tokens, with no token overlap between chunks. This can work well if there are hard contextual boundaries between chunks — i.e., the context varies drastically between adjacent chunks. In reality, this is rarely ever the case, but we will keep this as a baseline.
How to Choose the Right Chunking Strategy for Your LLM Application | MongoDB3 — Embedding adaptors 🧩 This method leverages user feedback on the relevancy of the retrieved documents to train an adapter.
3 Advanced Document Retrieval Techniques To Improve RAG Systems | by Ahmed Besbes | Towards Data Science2 — Cross encoder re-ranking 📊 This method re-ranks the retrieved documents according to a score that quantifies their relevancy with the input query.
3 Advanced Document Retrieval Techniques To Improve RAG Systems | by Ahmed Besbes | Towards Data ScienceThe downside of this method is that we end up with a lot more documents that may distract the LLM from generating a useful answer. That’s where re-ranking comes into play 👇.
3 Advanced Document Retrieval Techniques To Improve RAG Systems | by Ahmed Besbes | Towards Data ScienceThe idea behind this method is that you extend the initial query that may be incomplete or ambiguous and incorporate related aspects that can be eventually relevant and complementary. Here’s a prompt I used to generate the related questions: You are a helpful expert financial research assistant. Your users are asking questions about an annual report. Suggest up to five additional related questions to help them find the information they need, for the provided question. Suggest only short questions without compound sentences. Suggest a variety of questions that cover different aspects of the top…
3 Advanced Document Retrieval Techniques To Improve RAG Systems | by Ahmed Besbes | Towards Data Science👉 Query expansion with multiple related questions This second method instructs an LLM to generate N questions related to the original query and then sends them all (+ the original query) to the retrieval system.
3 Advanced Document Retrieval Techniques To Improve RAG Systems | by Ahmed Besbes | Towards Data ScienceHere’s an example of a prompt I used to augment the query sent to a RAG that answers questions about financial reports. You are a helpful expert financial research assistant. Provide an example answer to the given question, that might be found in a document like an annual report.
3 Advanced Document Retrieval Techniques To Improve RAG Systems | by Ahmed Besbes | Towards Data Science