Understanding Raft Leader Election by building from scratch
submitted by /u/Sushant098123 [link] [留言]
submitted by /u/Sushant098123 [link] [留言]
I still remember the frustration when our team's support bot, powered by LangGraph and MCP, couldn't retain context between user interactions. It was as if the bot had a case of conversational amnesia, forcing users to repeat themselves over and over. We later discovered that the issue stemmed from our lack of a centralized tooling server, making it impossible for the bot to access and leverage external tools in a scalable manner. This experience taught us the importance of building a robust MCP server to expose tools to our AI applications. In this post, we'll walk through the process of setting up an MCP server, focusing on exposing a single tool to any MCP-compatible AI app. Let's consider a simple tool that performs sentiment analysis on text input. We want this tool to be accessible from our support bot, allowing it to gauge user sentiment and respond accordingly. The first step in building an MCP server is to define the tool and its interface. MCP provides a set of APIs and protocols for tool definition, including the Tool class and the MCPTool interface. We'll use these to create our sentiment analysis tool. Here's a simplified example of how we might define this tool in Python: from MCP import Tool , MCPTool class SentimentAnalysisTool ( Tool , MCPTool ): def __init__ ( self ): super (). __init__ () self . name = " SentimentAnalysis " self . description = " Analyzes the sentiment of the input text " def execute ( self , input_text ): # Simplified sentiment analysis logic for demonstration if " love " in input_text or " great " in input_text : return " Positive " elif " hate " in input_text or " bad " in input_text : return " Negative " else : return " Neutral " # Create an instance of our tool sentiment_tool = SentimentAnalysisTool () Next, we need to set up an MCP server to host our tool. MCP servers can be configured to expose tools over various interfaces, including REST and gRPC. For simplicity, let's use a basic REST server. We'll use Flask, a lightweig
https://xcancel.com/karpathy/status/2083749667410727319
📅 เขียนเมื่อ: กรกฎาคม 2026 ⚠️ ตรวจสอบข้อมูลจาก Go Specification, APL documentation, และบันทึกของผู้พัฒนา ถ้าคุณเขียน Go มาระยะหนึ่ง คุณคงเคยเห็น iota — เจ้า identifier ประหลาดที่ไม่มีใครรู้ว่ามันคืออะไรตอนเจอครั้งแรก const ( Monday = iota + 1 // 1 Tuesday // 2 Wednesday // 3 ) มันไม่ใช่ keyword, ไม่ใช่ type, ไม่ใช่ function — มันคืออะไรกันแน่? และที่สำคัญ — ทำไมต้องชื่อ iota ? คำตอบพาเราย้อนกลับไปถึงปี 1962 — ถึงนักคณิตศาสตร์ชาวแคนาดาคนหนึ่ง และภาษาโปรแกรมมิ่งที่เปลี่ยนโลก iota คืออะไรใน Go ใน Go spec — iota คือ predeclared identifier ที่ใช้ เฉพาะใน const declaration เท่านั้น มันทำสิ่งเดียว: นับเลขให้อัตโนมัติ const ( _ = iota // 0 (skip) KB = 1 << ( 10 * iota ) // 1 << 10 = 1024 MB // 1 << 20 = 1,048,576 GB // 1 << 30 ) ค่า iota เริ่มที่ 0 และเพิ่มทีละ 1 ทุกครั้งที่เจอบรรทัดใหม่ใน const block — แม้ว่าบรรทัดนั้นจะไม่ได้ใช้ iota ก็ตาม สิ่งที่ทำให้ iota ทรงพลังคือมันเป็น expression (ไม่ใช่แค่ตัวเลข) — คุณเอาไปคูณ บวก ลบ shift ได้หมด const ( Read = 1 << iota // 1 << 0 = 1 Write // 1 << 1 = 2 Execute // 1 << 2 = 4 ) นี่คือวิธีมาตรฐานในการสร้าง enum, bitmask, และ constant series ใน Go — ทั้งหมดด้วย keyword เดียว iota — อักษรกรีกตัวเล็กที่สุด ก่อนจะเป็นชื่อใน Go — ιώτα (iota) คืออักษรตัวที่ 9 ของกรีกโบราณ: ι มันคืออักษรที่ เล็กที่สุด ในภาษากรีก — แค่เส้นตรงหนึ่งเส้น ไม่มีหาง ไม่มีขีด ในพระคัมภีร์ไบเบิล มีวลี famous: "not one iota" — แปลว่า "ไม่แม้แต่นิดเดียว" — เพราะ iota คือสิ่งที่เล็กที่สุด และมันคือชื่อที่สมบูรณ์แบบสำหรับสิ่งที่ "เพิ่มทีละหนึ่ง" จุดเริ่มต้น — APL และ Kenneth Iverson นักคณิตศาสตร์ผู้สร้างภาษา ปี 1962 — Kenneth E. Iverson ตีพิมพ์หนังสือ "A Programming Language" (ที่มาของชื่อ APL) Iverson เป็นนักคณิตศาสตร์ชาวแคนาดา (ต่อมาได้ Turing Award ปี 1979) — เขาไม่ได้แค่ออกแบบภาษาใหม่ แต่ปฏิวัติวิธีคิดเรื่อง programming แทนที่จะเขียน for i = 1 to 10 — Iverson คิดว่า programming ควรเหมือนคณิตศาสตร์: สั้น, สัญลักษณ์, และทรงพลัง เกิดเป็น ⍳ (iota) ใน APL, Iverson สร้าง operator ⍳ — เรียกว่า iota — ที่ทำสิ่งเดียว: สร้างลำดับเลข ⍳ 5 → 1 2 3 4 5 ⍳ 10 → 1 2 3 4 5 6 7 8 9 1
submitted by /u/donutloop [link] [留言]
大模型来了,有个说法是如果一个问题容易验证 那么ai就容易学会解决!说说这个特性与p np问题的关联性 这个说法听起来很直观,但其实 混淆了"验证的复杂性"和"学习/求解的复杂性"这两件不同的事 。我们把它拆开看。 先把"容易验证"在 P/NP 里的精确定位理清 在计算复杂度理论中: NP = 给定候选解(证书),能在多项式时间内验证其正确性的问题 P = 能在多项式时间内直接求解的问题 P ≠ NP ? = 是否所有容易验证的问题,也都容易求解? 所以"容易验证"在 CS 里的严格含义是: 验证者在多项式时间内工作 , 不是说 AI 训练成本低 。 "容易验证 ⇒ AI 容易学会"——部分成立,但有重要的限定 这个直觉 在某些场景下确实成立 ,原因是"验证"提供了 稠密的训练信号 : ✅ 成立的情形:验证器可作奖励/过滤 当一个问题具备"易于验证"的结构时,我们可以用它来: 生成训练数据 :比如 SAT 问题,随机生成一个赋值,代入公式验证,正确就得到一对 (公式, 赋值) 训练样本—— 数据无限且免费 RL 中的奖励塑形 :LLM 生成代码 → 编译器/单元测试验证 → immediate reward Self-play / 自我蒸馏 :AlphaGo 等用模拟器验证落子结果 Verifier-Guided Search :用"易于验证"的判据引导 beam search / MCTS,如 AlphaCode、AlphaGeometry 💡 这就是为什么像 代码生成、形式化证明、数学解题 这些领域近期进展飞快——它们都有"相对容易的验证器"(单元测试、类型检查器、证明校验器)。 ❌ 但这个推论远非普遍成立 "容易验证"≠"AI 容易学会",有几个关键原因: 1. 验证器只给二值信号,梯度稀疏 验证器通常只输出 0/1(对/错),而深度学习需要平滑的损失曲面。对于复杂的 NP 问题,绝大多数随机猜测都是错的 → 奖励恒为 0 → 梯度消失,学不到东西 。这就是"稀疏奖励"难题。 2. P ≠ NP 意味着:验证简单 ≠ 求解简单 即使验证是 O(n),找到那个能通过验证的解可能仍需 O(2ⁿ)。AI 模型本质上是在做启发式搜索,面对组合爆炸, 没有 free lunch 。例如: 数独:验证 O(n²),但最难的数独对人类和 AI 都极具挑战 TSP:验证一条回路 O(n),但找最优回路是 NP-Hard 3. 分布偏移与泛化 NP 问题的"容易验证"是** worst-case 复杂度**意义下的。AI 学到的是训练分布的统计规律,遇到分布外的实例会失效。比如 LLM 在数学竞赛题上表现好,但换个数字或换种表述就可能崩。 4. 验证本身也可能不在 NP 里 很多现实问题是 PSPACE 或更难 (如围棋先手胜负),验证一个"策略"需要指数时间——这种问题连"提供证书让 AI 模仿"都很困难。 一张对照表 问题类型 验证复杂度 AI 易学吗? 例子 P 类 多项式 通常容易 (有高效算法可直接教) 排序、最短路径 NP-Complete,且有稠密验证信号 多项式 中等 (RL + 验证器有效) SAT、数独、TSP 近似 NP-Complete,但验证信号稀疏 多项式 困难 (奖励太稀) 某些密码学难题 超出 NP(PSPACE 等) 超多项式 极难 (验证本身就很贵) 围棋先手胜、QSAT 不可判定 不存在 不可能 (理论上限) 程序等价性 真正的关联在哪里 "容易验证 ⇒ AI 容易学会"更准确的说法应该是: 📌 如果一个问题有"多项式时间的验证器",并且我们能从中提取稠密的训练信号(如 partial credit、逐步验证),那么 AI 可以通过"生成 + 验证"的循环去逼近求解。 这本质上就是 用 NP 的"验证侧"去攻击"求解侧" ——也是当前 LLM + Verifier 范式(如 RLHF 中的 reward model、AlphaProof 的 formal verifier)的理论基础。 但要注意: 这不是 P=NP 的证明,AI 找到的解在 worst-case 仍可能不是最优的 AI 解决的是 平均情况(average-case) 或 特定分布 ,而非 worst-case 一旦问题规模增大到超出训练分布,性能会急剧下降 一个更深的视角:平均-case 复杂度 理论计算机科学里有个分支叫 Average-Case Complexity ,研究"典型实例"的难度。很多 NP-Complete 问题在 average-case 下其实有不错启发式算法——这也解释了为什么 AI 在某些 NP 问题上表现惊喜,但在 adversarial 构造的 hard instance 上翻车。 所以回到你的说法: "
This guide is a collection or a summary on how to install and use a footprint of Apache Hadoop. I tried to follow an old version 2.7.1 guide that I created few years ago and adjusted this to use the latest version. Apache Hadoop 3.5.0 is used below; check the Apache releases page before future installations. These instructions target Linux (Ubuntu/Debian) for development or testing. Production clusters need Kerberos, network controls, encryption, monitoring, backups, and an upgrade plan. Do not expose HDFS or YARN ports to the internet. Native single-node installation Prerequisites sudo apt-get update sudo apt-get install -y openjdk-17-jdk openssh-client openssh-server pdsh curl tar java -version Hadoop requires Java and SSH; pdsh is recommended by the current Apache single-node documentation. Find JAVA_HOME if needed: readlink -f "$(command -v java)" | sed 's:/bin/java::' Download and install Pin the version for repeatable installs and verify Apache's SHA-512 checksum: export HADOOP_VERSION=3.5.0 cd /tmp curl -fLO "https://archive.apache.org/dist/hadoop/common/hadoop-${HADOOP_VERSION}/hadoop-${HADOOP_VERSION}.tar.gz" curl -fLO "https://archive.apache.org/dist/hadoop/common/hadoop-${HADOOP_VERSION}/hadoop-${HADOOP_VERSION}.tar.gz.sha512" sha512sum -c "hadoop-${HADOOP_VERSION}.tar.gz.sha512" sudo tar -xzf "hadoop-${HADOOP_VERSION}.tar.gz" -C /opt sudo ln -sfn "/opt/hadoop-${HADOOP_VERSION}" /opt/hadoop sudo chown -R "$USER":"$USER" "/opt/hadoop-${HADOOP_VERSION}" Add this to ~/.bashrc, adjusting JAVA_HOME if necessary: export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 export HADOOP_HOME=/opt/hadoop export HADOOP_CONF_DIR="$HADOOP_HOME/etc/hadoop" export HADOOP_HDFS_HOME="$HADOOP_HOME" export HADOOP_YARN_HOME="$HADOOP_HOME" export HADOOP_MAPRED_HOME="$HADOOP_HOME" export PATH="$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin" Then load and verify it: source ~/.bashrc sed -i "s|^# export JAVA_HOME=.*|export JAVA_HOME=${JAVA_HOME}|" "$HADOOP_HOME/etc/hadoop/hadoop-env.sh" had
Yesterday I announced I'm blogging daily on AWS & DevOps. Here's Day 1 — the fundamentals everything else builds on. ## What is Cloud Computing? Instead of setting up and maintaining infrastructure on-premises, you now access computing resources remotely over the internet — this is Cloud Computing. "Cloud" refers to a network that provides resources over the internet, accessible whenever needed. It evolved from grid computing, virtualization, and distributed computing. All you need to use it is a web browser. As per NIST , cloud computing is a model for enabling convenient, on-demand network access to a shared pool of configurable computing resources (networks, servers, storage, applications, services) that can be rapidly provisioned and released with minimal management effort. Key characteristics: uses virtualization, enables on-demand access, and offers "pay-as-you-use" pricing. Traditional companies had to spend heavily on infrastructure, hardware, and operations. With cloud computing, providers manage all of this — handling troubleshooting, recording activity, and sending analytics data to users. Service Models — IaaS, PaaS, SaaS IaaS : Providers offer databases, servers, storage, and networking as a service, and you pay per use. Examples: AWS, Azure, GCP. PaaS : Gives you an on-demand environment for developing, testing, and delivering apps, with ready dev tools already set up. Examples: Heroku, Google App Engine. SaaS : Delivers ready-to-use software over the internet, usually via subscription, with the provider managing everything underneath. - Examples: Gmail, Microsoft 365, Google Drive. The layered view: moving from On-Premise to IaaS to PaaS to SaaS, each model hands you a bigger pre-managed slice. On-premise means you manage everything yourself. IaaS shifts virtualization, servers, storage, and networking to the vendor. PaaS additionally hands over OS, middleware, and runtime. SaaS means the vendor manages everything — you just use the app. The biryani a
📅 เขียนเมื่อ: กรกฎาคม 2026 ⚠️ อ้างอิงจากเอกสารต้นฉบับของ Bell Labs และบันทึกของผู้พัฒนา ถ้าผมถามว่า "ระบบปฏิบัติการที่เจ๋งที่สุดในโลกคืออะไร" — คุณคงตอบ Linux, macOS, หรือ Windows แต่ถ้าถาม Ken Thompson และ Dennis Ritchie — สองคนที่สร้าง Unix ขึ้นมา — พวกเขาจะตอบว่า Plan 9 Plan 9 คือระบบปฏิบัติการที่ Bell Labs สร้างขึ้นในช่วงปลายยุค 80 ถึงต้นยุค 90 โดยทีมเดียวกับที่สร้าง Unix แต่มันไม่ใช่แค่ "Unix เวอร์ชันใหม่" — มันคือการเริ่มต้นใหม่ทั้งหมด และถึงแม้วันนี้แทบไม่มีใครใช้ Plan 9 — แนวคิดของมันแทรกซึมอยู่ในทุกระบบปฏิบัติการที่คุณใช้อยู่ จุดเริ่มต้น — "Unix เริ่มแก่แล้ว" ปัญหาที่ Unix สะสมมา Unix เกิดในปี 1969 — ตอนนั้นคอมพิวเตอร์คือเครื่องเดียวที่มี terminal ต่อพ่วง พอยุค 80 มาถึง โลกเปลี่ยน — network กลายเป็นเรื่องปกติ, graphics เริ่มสำคัญ, distributed computing เริ่มเกิด แต่ Unix ไม่ได้ถูกออกแบบมาเพื่อสิ่งเหล่านี้ มันถูก patch, extend, retrofit — จนกลายเป็นระบบที่ซับซ้อนเกินกว่าที่ผู้สร้างจะภูมิใจ Ken Thompson เคยพูดประมาณว่า: "Unix เริ่มต้นด้วยความเรียบง่าย แต่มันค่อย ๆ สะสมความซับซ้อนเข้าไปเรื่อย ๆ — ถึงเวลาที่ต้องเริ่มใหม่" ทำไมต้องชื่อ Plan 9 ชื่อ "Plan 9" มาจากหนัง B-movie สุดคลาสสิกเรื่อง "Plan 9 from Outer Space" (1959) ของ Ed Wood — ที่ได้ชื่อว่าเป็น "หนังที่แย่ที่สุดตลอดกาล" แต่ชื่อนี้ไม่ได้หมายความว่า OS นี้แย่ — มันคือมุกวงในของทีม Bell Labs ที่ชอบตั้งชื่อแปลก ๆ (Unix เองก็เป็นมุก — มันล้อ Multics) หัวใจของ Plan 9 — "ทุกอย่างคือไฟล์" จริง ๆ จาก Unix สู่ Plan 9 — ทำให้สุดทาง Unix มีแนวคิด famous: "everything is a file" filesystem เป็นไฟล์ → /home/user/document.txt devices เป็นไฟล์ → /dev/sda , /dev/tty processes เป็นไฟล์ → /proc/1234 แต่มันมีข้อยกเว้น — network sockets, graphics, window system — สิ่งเหล่านี้ไม่ใช่ไฟล์ใน Unix Plan 9 เอาแนวคิดนี้ไป สุดทาง — ใน Plan 9, ทุกอย่างคือไฟล์ ไม่มีข้อยกเว้น 9P — โปรโตคอลเดียวที่เชื่อมทุกอย่าง หัวใจของ Plan 9 คือ 9P — โปรโตคอลที่ทำให้ทุกอย่างสื่อสารกันผ่าน filesystem หน้าต่าง GUI → mount เป็นไฟล์ network connection → mount เป็นไฟล์ เครื่องอื่นใน network → mount เป็นไฟล์ ลองนึกภาพ: คุณ ls ดูไฟล์ในเครื่องคนอื่นได้เหมือน
Introduction Your agent guesses. It matches names as text and hopes the right line was in...
CleanSlate is an open-source platform for running coding agents across your local machine and the cloud. Today, it works through an IDE, CLI, and SDK. Agents can understand a codebase, make changes, run commands, browse the web, and verify their work. We are now building longer-running autonomous cloud agents that can continue working without keeping your machine active. CleanSlate supports multiple model providers and is not tied to a single ecosystem. GitHub: https://github.com/TheWariend/CleanSlate Website: https://thewariend.com/cleanslate The project is still early, and I would appreciate honest feedback from developers who use coding agents.
This is part of my Building Fluentic Style series, where I’m writing down the design decisions, tradeoffs, and small surprises from building Fluentic Style . It is one thing to make a styling library feel good in a client-side app. It is another thing to make it feel good in Next.js App Router. In a simple SPA-style development setup, most of the styling loop lives in one place: component renders in the browser Fluentic style chain resolves atomic CSS rule is inserted DevTools can inspect the generated rule sourcemap points back to authored code That is already a lot of work. But at least the browser is the main place where the style is produced and consumed. Next.js App Router changes the shape of the problem. Now the page can involve: server rendering React Server Components client components streamed HTML hydration client-side navigation HMR Webpack or Turbopack development sourcemaps production extraction So the hard part is not just “can Fluentic run in Next.js?” The hard part is: Can Fluentic keep the same CSS debugging experience when styles cross the server/client boundary? That is what this post is about. Docs for the Next.js integration are here: Next.js Integration DevTools And Sourcemaps Runtime And Dev Debug Without Getting Lost The Goal Was Not A Special Next.js API I did not want Fluentic to have one mental model for client apps and another one for Next.js. This should still be normal Fluentic: const card = style ({ padding : 16 , borderRadius : 12 , }). hover ({ boxShadow : ' 0 12px 30px rgb(15 23 42 / 0.16) ' , }); export function Card () { return < section css = { card } > Hello </ section >; } And this should still be normal Fluentic too: const buttonStyles = { root : style . slot ({ display : ' inline-flex ' , border : 0 , }), label : style . slot ({ fontWeight : 700 , }), }; const danger = style . scope ([ buttonStyles . root ({ backgroundColor : ' #dc2626 ' , }), buttonStyles . label ({ color : ' #ffffff ' , }), ]); The Next.js integration shou
Mainline-friendly products are designed so their board support lives in upstream Linux, U-Boot, and standard build systems instead of a vendor fork. The decision is architectural, not aspirational: it is made when you choose the SoC, design the add-on connectors, and write the device tree — not when the product is already shipping. This article gives the strategic case, the product design rules that follow from current kernel work on hot-pluggable add-on boards, a vendor checklist for tech leads, and the concrete steps to upstream your own board support. We have covered why silicon vendors are moving to upstream-first BSPs . This article covers the product team's side of that shift: what you should do about it. Building mainline-friendly products means making a set of design decisions — SoC selection, connector design, device tree structure, and an upstreaming plan — so that mainline Linux and U-Boot treat your board as a normally supported board rather than as a permanent private port. Each section below turns one of those decisions into rules you can apply on your next board. Why mainline-friendly products are a strategic decision The cost of a vendor-fork BSP is not paid at bring-up; it is paid for the life of the product. Every kernel upgrade becomes a forward-port of private patches. Every security fix arrives on the vendor's schedule, not the kernel's — and for devices in scope of regulations such as the EU Cyber Resilience Act, patch latency is now a compliance question, not just an engineering one. Hiring is harder, because engineers must learn your fork before they can touch it, and the knowledge they build does not transfer in either direction. Board support that lives in mainline inverts each of these. New kernels are more likely to boot your board without forward-porting private support patches, because your board is part of the kernel's own build-and-test surface; LTS security fixes are easier to consume because the code paths you depend on are already
This is a submission for Frontend Challenge - Comfort Food Edition, Perfect Landing 🍳 Pixel Chef AI — A Memory Kitchen That Learns Your Taste What I Built Pixel Chef AI is an interactive AI cooking companion built around a simple idea: Food is not only about recipes. It is about memories, habits, emotions, and personal taste. Instead of being a traditional recipe generator, Pixel Chef AI creates a complete AI-powered cooking journey: 🧊 Enter the Memory Kitchen 🥬 Choose ingredients 🤖 Let AI analyze flavors and nutrition 🔥 Cook with real-time AI guidance 🍽️ Reveal your final dish 🧬 Build your personal Taste DNA Every cooking session becomes a memory. Over time, the AI learns your cooking preferences, flavor choices, and habits to create a more personalized kitchen experience. The core question behind this project: What if your AI assistant could remember how you cook and become your personal kitchen companion? ✨ Features 🧠 AI Taste Intelligence Pixel Chef AI is designed around the idea that cooking decisions are personal. The AI analyzes: Ingredient combinations Flavor balance Nutrition information User preferences It can: Predict flavor direction Suggest ingredient improvements Recommend better combinations Adapt suggestions based on cooking goals 🤖 AI Cooking Companion A pixel AI chef accompanies users throughout the entire cooking process. The AI provides: Ingredient analysis Flavor recommendations Cooking suggestions Real-time guidance during cooking Personalized feedback The goal is to make AI feel like a kitchen partner, not just a chatbot. 🧊 Interactive Pixel Kitchen The experience starts inside a cozy pixel-art kitchen. Users can: Open the fridge Select ingredients Create their own combinations Watch AI analyze their choices The kitchen becomes a place where users interact with AI through cooking. 🔥 AI Cooking Simulation Cooking becomes an interactive experience instead of a simple result page. During cooking: A cooking timeline controls progress Different coo
The answer arrives clean, well-formatted, and certain. You run it. The config flag doesn't exist. Nothing in the response told you the difference between the parts it was sure about and the parts it filled in. The syntax was right. The explanation was reasonable. The flag had a sensible name and a clear purpose. It just wasn't real. This is a calibration problem, not a trust problem. "Don't trust AI" is useless advice. It tells you to doubt everything, which is the same as doubting nothing, because you can't actually work that way. What you need instead is a way to tell which parts of an answer are grounded and which were filled in. There are patterns to look for, and once you know them, they are hard to miss. 🔍 Why this affects beginners specifically This isn't about intelligence. It's about experience. An engineer with a few years behind them has already lost time to a function that didn't exist. They have wasted an afternoon on a config parameter that turned out to belong to a different engine. They have built up a collection of "that looked right but wasn't" memories, and those memories now activate automatically. A small feeling that says check this one before they run it. Beginners haven't had those afternoons yet. The pattern recognition that comes from repeated failures doesn't exist, because the failures haven't happened. Everything arrives in the same confident tone, and without past mistakes to compare against, there is no internal signal separating a grounded answer from a made-up one. That's not a character flaw. It's missing experience, and it can be partly replaced with three concrete things to look for. ✅ The three signs These aren't perfect. They are a minimum standard, and they catch the common cases. I'll be clear about what they miss at the end. Sign 1: Very specific details with no source When the answer includes a precise detail (a specific config flag, a particular function signature, an exact version number) and doesn't say where that detail
Noticed a pattern: people switch from GPT to Claude, upgrade to a newer version, try a bigger model and the output barely changes. If that's happened to you, the issue usually isn't the model. It's what you handed it before asking the question. Broke it down to three things context actually needs to supply, and most disappointing outputs are missing one of these, not all of them: Current facts the training data can't know: your pricing, this quarter's numbers, a customer's actual history. Leave this out and the model doesn't leave a blank, it quietly invents something plausible. A concrete example of what "good" looks like: not "professional tone," an actual paragraph to pattern-match against. Descriptions get interpreted, examples get copied. What already happened earlier in the task: a correction you made two messages ago. If you don't restate it, it's gone. The model isn't ignoring you, it just doesn't re-read messages you haven't pointed it back to. The counterintuitive part: the most common mistake isn't giving too little context, it's dumping in too much unfiltered. The model has to weigh every token, and irrelevant material competes for attention with what actually matters. Forty pages when the task needs three paragraphs makes the right answer harder to find, not easier. Wrote up a longer breakdown with a concrete before/after example (same task, same model, only the context changed): https://medium.com/@nagatomopedro05/good-ai-starts-with-good-context-design-77496f7b9eb6 Curious if others here have run into this, model-swapping as a first instinct instead of fixing the input. submitted by /u/ClickOk5811 [link] [留言]