LLM Knowledge Bases
Something I'm finding very useful recently: using LLMs to build personal knowledge bases for various topics of research interest. In this way, a large fraction of my recent token throughput is going less into manipulating code, and more into manipulating knowledge (stored as markdown and images). The latest LLMs are quite good at it. So:
Data ingest:
I index source documents (articles, papers, repos, datasets, images, etc.) into a raw/ directory, then I use an LLM to incrementally "compile" a wiki, which is just a collection of .md files in a directory structure. The wiki includes summaries of all the data in raw/, backlinks, and then it categorizes data into concepts, writes articles for them, and links them all. To convert web articles into .md files I like to use the Obsidian Web Clipper extension, and then I also use a hotkey to download all the related images to local so that my LLM can easily reference them.
IDE:
I use Obsidian as the IDE "frontend" where I can view the raw data, the the compiled wiki, and the derived visualizations. Important to note that the LLM writes and maintains all of the data of the wiki, I rarely touch it directly. I've played with a few Obsidian plugins to render and view data in other ways (e.g. Marp for slides).
Q&A:
Where things get interesting is that once your wiki is big enough (e.g. mine on some recent research is ~100 articles and ~400K words), you can ask your LLM agent all kinds of complex questions against the wiki, and it will go off, research the answers, etc. I thought I had to reach for fancy RAG, but the LLM has been pretty good about auto-maintaining index files and brief summaries of all the documents and it reads all the important related data fairly easily at this ~small scale.
Output:
Instead of getting answers in text/terminal, I like to have it render markdown files for me, or slide shows (Marp format), or matplotlib images, all of which I then view again in Obsidian. You can imagine many other visual output formats depending on the query. Often, I end up "filing" the outputs back into the wiki to enhance it for further queries. So my own explorations and queries always "add up" in the knowledge base.
Linting:
I've run some LLM "health checks" over the wiki to e.g. find inconsistent data, impute missing data (with web searchers), find interesting connections for new article candidates, etc., to incrementally clean up the wiki and enhance its overall data integrity. The LLMs are quite good at suggesting further questions to ask and look into.
Extra tools:
I find myself developing additional tools to process the data, e.g. I vibe coded a small and naive search engine over the wiki, which I both use directly (in a web ui), but more often I want to hand it off to an LLM via CLI as a tool for larger queries.
Further explorations:
As the repo grows, the natural desire is to also think about synthetic data generation + finetuning to have your LLM "know" the data in its weights instead of just context windows.
TLDR: raw data from a given number of sources is collected, then compiled by an LLM into a .md wiki, then operated on by various CLIs by the LLM to do Q&A and to incrementally enhance the wiki, and all of it viewable in Obsidian. You rarely ever write or edit the wiki manually, it's the domain of the LLM. I think there is room here for an incredible new product instead of a hacky collection of scripts.
“Loop engineering” is a hot buzzphrase after mentions of it by Boris Cherny (Claude Code’s creator) and Peter Steinberger (OpenClaw's creator) went viral on social media. Loops are now a key part of how we get AI agents to iterate at length to build software. In this letter, I’d like to share my 3 key loops, shown in the image below, for building 0-to-1 products. These loops guide not just how I build software, but also how I decide what software to build.
Agentic coding loop: Given a product specification and optionally a set of evals (that is, a dataset against which to measure performance), we can have an AI agent write code, test its work, and keep iterating until the code is bug-free and meets its specification. This idea of closing the loop took off around the end of last year, and it has been a game changer in enabling coding agents to work longer productively without human intervention. For example, over the weekend, I was building an app for my daughter to practice typing, and my coding agent could easily work for around an hour, using a web browser to check what it had built multiple times before getting back to me, without needing my intervention.
The engineering loop executes quickly. Every few minutes, the coding agent might build and test a new version of the software. I hear frequently from developers who are finding new ways to engineer more effective engineering loops. This is an active area of invention!
Developer feedback loop: In this loop, a developer examines the current product and steers the coding agent to improve it. Last year, a lot of developers (including me) were acting as the QA (quality assurance) function for our coding agents, manually finding bugs and then asking the agent to fix them. But with coding agents much more able to test their own code, the amount of time we need to spend on this function has decreased significantly. This allows us to make higher-level product decisions, such as what key features to offer, where the UI needs improvement, and so on.
The developer-feedback loop operates over time intervals between tens of minutes and hours — that's how frequently a developer might review a product and give feedback. In the case of the typing app, I changed my mind a few times about the visual design, what cat costumes she can unlock as she learns (she loves cats), and the user flow for a grown-up to log in and steer the child's learning experience.
When a developer has a clear vision for what to build, it is still a lot of work to translate that vision into a specification for a coding agent to implement. Further, after the developer has seen an implementation, they might update (or perhaps clarify) the spec to steer it toward what they want. If you find that the system repeatedly runs into certain problems, building a set of evals for the agent becomes useful.
AI-native teams are increasingly using AI to help shape product direction, for example, automating the gathering and analysis of usage data, summarizing written and verbal customer feedback, or carrying out competitive analysis. However, for pretty much all the products I’m involved in, I see humans as having a significant context advantage over current AI systems — we know a lot more than the AI system about the users and the context the product has to operate in — and thus humans play a critical role. Many people describe this human contribution as “taste,” but I prefer to think of it as humans having a context advantage, since that gives us a clearer path to helping AI systems get better. This also speaks to why this step can’t be automated: So long as the human knows something the AI does not, human-in-the-loop is needed to to inject that knowledge into the system.
External feedback loop: This includes a wide range of tactics like asking a few friends for feedback, launching to alpha testers, or putting the code into production with A/B testing. These tactics are usually slow, rarely taking less than hours and sometimes taking days or even weeks. This data informs the developer vision, which in turn continues to drive the detailed product spec, which in turn drives the coding agent.
With coding agents speeding up software development, more engineers are starting to play a partial product management role. For many engineers who are growing into this role, the hardest part is shaping the product vision and striking a balance between building (bridging the gap between vision and spec) and getting user feedback to evolve the vision. It is important to do both!
I will write more about how to do this in future posts, but for now, I find it encouraging that engineers are playing an expanded role (just as product managers and designers now do more engineering).
[Original text: The Batch]
يوجد بشارع النعيرية بمدينة الرياض
انواع المخالفين و التستر التجاري
عمالة منتشرة بالشارع
بعض المحلات بدون سجلات تجارية بدون ضريبة
وبعض الورش يستاجرها مجموعة من العمالة المخالفة
وتمارس داخل الورشة تصنيع الدكت وبيعه و ممارسة
التجارة ومتستر عليهم وبدون ضريبة
والنظامي هو المتضرر
وايضا يبيع مواد مغشوشة وما ندري كيف يصل صوتنا
وصوت المتضررين اللي يدفعون الزكاة و الضريبة والرسوم
@emara_alriyadh@nazaha_gov_sa@MOFKSA
@AzizKhudiry@AbuEyas_1980@HRSD_SA عندنا في قطاع الورش الصناعيه للمونيوم والحداده وغيرها تحديات قويه مثل العماله تتعامل بدون ضريبه وتحصل على مواد رخيصه بشكل كبير لا تعرف واين يجيبون هذه المواد … يصعب على المواطن المنافسه خصوصا النظامي
بعض البورسلان الايطالي مصنوع بالصين
ويتم التلاعب ببلد المنشأ لعدة اسباب اهمها
١- كلمة صنع بايطاليا مع وجود دعاية من حسابات المهتمين بالبناء تجعله يباع بشكل اسرع من الصيني
٢- هناك رسوم اغراق على البورسلان الصيني ودخوله عن طريق البر باسم صنع بايطاليا لتفادي
رسوم الاغراق
عندما تحاول أن تُقيم العدل في المنظمة التي تقودها، سيغضب منك أصحاب المصالح، ومن كان العمل آخر اهتماماته، ومن تسلّق سُلّم الترقيات بالواسطة، ومن أصبح الموظف المدلل بسبب قرابته. كثيرون سيغضبهم ذلك.
لكن...
سيفرح بذلك المخلصون من الموظفين، ومن أنهكهم الظلم؛ فهؤلاء هم الذين تقوم عليهم المنظمات، وعلى أكتافهم يُبنى مستقبل الوطن، وهم من سيقفون إلى جانبك ويدعمونك في طريق النجاح والتميز.
#تأملات_قيادية
"Mathematics of Neural Networks" is an excellent set of lecture notes for anyone who wants to study modern neural networks from a mathematical perspective.
It covers supervised learning, artificial neurons and activation functions (ReLU, sigmoid, tanh, swish, softmax), shallow and deep neural networks, stochastic gradient descent, weight initialization, vanishing and exploding gradients, convolutional neural networks, automatic differentiation, backpropagation, adaptive optimization algorithms (Adagrad, RMSProp, Adam), and concludes with modern geometric concepts such as manifolds, Lie groups, equivariance, group convolutions, and rotation-translation equivariant CNNs.
I recommend keeping it in your bookmarks as a useful reference whenever you need to explore the mathematics behind neural networks.
https://t.co/78VDWxjDUa
I put together a new article on setting up local coding agents with open-weight models. Everything runs 100% locally.
I thought it might be useful putting this together because many people asked me about my setup in the past, and I thought it would also motivate people to get started tinkering with local models for serious work (yes, things got incredibly capable this year with better LLMs and better harnesses).
So, here's a walkthrough of how to connect a local LLM to a local coding harness (could be Claude Code or Codex, which you may already be familiar with).
I also included some assessment notes that are useful as a checklist to select between and consider certain LLMs over others:
- Checking RAM usage at long contexts to see if the model is suitable for real work
- Measuring prefill and decoding tok/sec to see whether it's fast enough to not be annoying
- Making sure the model has sufficient tool-calling capabilities in theory
- Assessing whether the model can solve some more challenging tasks when used in a coding harness.
Of course, there are always more specialized tools that can squeeze a bit more performance out of things, but I hope this is a good starter kit that stays flexible; that is you can easily switch to newer models as they are released or even tap into cloud models in your familiar harness if the current ones are not sufficient enough for a given task.
The gradient of a function gives the direction of its steepest rise and the speed of that change.
Take f(x, y) = 0.2(x² + y²).
Its partial derivatives are ∂f/∂x = 0.4x and ∂f/∂y = 0.4y.
The gradient ∇f = (0.4x, 0.4y) appears as the green arrows radiating outward on the grid. The red surface plots the function's height, lowest at the origin where the gradient vanishes.
It is used in machine learning to minimize error during model training by stepping against the gradient direction.
constrained optimization is basically the math of reality.
because in the real world, you are never optimizing in empty space. there is always a constraint.
maximize profit, but with limited capital.
design a robot arm, but with torque limits.
train a model, but with compute limits.
plan a trajectory, but avoid obstacles.
build anything, but obey physics.
that is the whole game.
you have an objective function: what you want to improve.
then you have a constraint: what reality allows.
the interesting part is where the best possible point touches the boundary of what is allowed. not outside it. not somewhere random. exactly on the edge.
that is why lagrange multipliers are so beautiful.
they say: at the optimum, the direction of improvement and the constraint become aligned.
∇f = λ∇g
meaning the system has reached a point where improving further would violate the constraint.
this is not just calculus. this is how engineering works.
the best solution is rarely the perfect solution.
it is the best feasible solution under real limits.
that is why constrained optimization shows up in robotics, control systems, machine learning, economics, operations research, and engineering design.
because intelligence is not just choosing the best outcome.
intelligence is choosing the best outcome that can actually exist.