frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Adventures in Symbolic Algebra with Model Context Protocol

https://www.stephendiehl.com/posts/computer_algebra_mcp/
121•freediver•6mo ago

Comments

behnamoh•6mo ago
So, we’ve come full circle to symbolic AI! This article essentially suggests that LLMs could be effective translators of our requests to command-line code or input to symbolic AI software, which would then yield precise solutions. However, I feel this approach is overly mechanical, and I don’t believe AGI would be achieved by creating thousands, if not millions, of MCP servers on our machines. This is especially true because MCP lacks scalability, and anyone who has had to send more than three or four function schemas to a language model knows that excessive JSON schema complexity confuses the model and reduces its performance.
pona-a•6mo ago
I'm reminded of what happened in the later years of Cyc. They found their logical framework didn't address certain common problems, so they kept adding specialized hard-coded solutions in Lisp. LLMs are headed for AI autumn.
godelski•6mo ago
I think the problem here is we keep making promises we can't keep. It causes us to put too many eggs in one bakery, ironically frequently preventing us from filling in those gaps. We'd make much more progress without the railroading.

There's only so much money but come on, we're dumping trillions into highly saturated research directions where several already well funded organizations have years worth of a head start. You can't tell me that there's enough money to throw at another dozen OpenAI competitors and another dozen CoPilot competitors but we don't have enough for a handful of alternative paradigms that already show promise but will struggle to grow without funding. These are not only much cheaper investments but much less risky then betting on a scrappy startup being the top dog at their own game.

ogogmad•6mo ago
The article also suggests that you could use a proof-verifier like Lean instead. Using that capability to generate synthetic data on which to train helps too. Very large context windows have been known to help with programming, and should help with mathematical reasoning too. None of this gives you AGI, I suppose, but the important thing is it makes LLMs more reliable at mathematics.

Anyone have a link to an article exploring Lean plus MCP? EDIT: Here's a recent Arxiv paper: https://arxiv.org/abs/2404.12534v2, the keyword is "neural theorem proving"

I've just remembered: AlphaEvolve showed that LLMs can design their own "learning curricula", to help train themselves to do better at reasoning tasks. I recall these involve the AI suggesting problems that have the right amount of difficulty to be useful to train on.

I'll ramble a tiny bit more: Anybody who learns maths comes to understand that it helps to understand the "guts" of how things work. It helps to see proofs, write proofs, do homework, challenge yourself with puzzles, etc. I wouldn't be surprised if the same thing were true for LLMs. As such, I think having the LLM call out to symbolic solvers could ultimately undermine their intelligence - but using Lean to ensure rigour probably helps.

bwfan123•6mo ago
We've come back full-circle to precise and "narrow interfaces".

Long story short, it is great when humans interact with LLMs for imprecise queries, because, we can ascribe meaning to LLM output. But for precise queries, the human, or the LLM needs to speak a narrow interface to another machine.

Precision requires formalism, as what we mean by precise involves symbolism and operational definition. Where the genius of the human brain lies (and which is not yet captured in LLMs) is the insight and understanding of what it means to precisely model a world via symbolism - ie, the place where symbolism originates. As an example, humans operationally and precisely model the shared experience of "space" using the symbolism and theory of euclidean geometry.

arunbahl•6mo ago
Awesome stuff! We use a similar approach (without MCP) to great effect with Prolog currently and feels like we're only just starting to scratch the surface here.

A great paper from Nasim Borazjanizadeh and Steven Piantadosi at UC Berkeley for those interested: Reliable Reasoning Beyond Natural Language https://arxiv.org/abs/2407.11373

For anyone digging in who wants to hack on this: arun [at] aloe.inc

tpurves•6mo ago
Wonderfully cheeky but also helpfully informative writeup. Also appreciate the hat-tip to all the (as yet) unsolved security issues. Clearly MCP is onto something important, although undoubtedly the standard (or some replacement standard) will mature a fair bit before we're done with it. The flip side to that is, MCPs are probably as 'easier' to experiment with now than they are ever going to be.
ash-ali•6mo ago
I think this is the proper way to use llms for tasks that require high fidelity. currently im working on binary analysis using llms for natural language and letting ghidra/codeql do the symbolic work. scalability is a massive issue, perhaps the biggest besides fidelity.

its interesting to see many people come to the same neuro-symbolic conclusion around the same time.

amelius•6mo ago
How does the LLM know that it can use the factor tool to factor integers? Just by looking at the string "factor an integer"?
manojlds•6mo ago
Yup

this is what the tools response for the mcp server looks like:

{ tools: [ 0: { name: "factor" description: "Factor an integer" inputSchema: { ... } 4 items } ] }

snek_case•6mo ago
They give it a list of tool commands it can use in the context I believe.
svat•6mo ago
Yes, and I believe this is what the article is referring to when it says “a stochastic black box that communicates through a complex web of JSON schemas attached to docstring annotations”. Specifically, in the function definition:

    @mcp.tool()
    def factor(a: int) -> int:
        """Factor an integer"""
        return factor_number(a)
the decorator `@mcp.tool()` does something behind the scenes to set up the right thing using the docstring of the function.

The documentation and source code seem to be:

- (official SDK): https://github.com/modelcontextprotocol/python-sdk/blob/e80c... -> using the function's docstring: https://github.com/modelcontextprotocol/python-sdk/blob/e80c...

- (v2?): https://gofastmcp.com/servers/tools#the-%40tool-decorator and https://github.com/jlowin/fastmcp/blob/998de22a6e76fc8ae323e... -> using the function's docstring: https://github.com/jlowin/fastmcp/blob/998de22a6e76fc8ae323e...

rjeli•6mo ago
the implementations have a distinctly "I wrote this at a 3 AM hackathon" vibe

The LLM handles the natural language interaction and orchestration, while the computer algebra system does what it does best ... exact symbolic manipulation.

this smells like claude :D

jgalt212•6mo ago
> But let's not let a potential rootkit get in the way of a fun weekend experiment.

Great quote.

FilosofumRex•6mo ago

  > So, we’ve come full circle to symbolic AI!
Yes, but from a business point of view, NLP based GUIs have been the holy grail of marketing and customer support, especially in STEM apps market.

Case in point, Wolfram Alpha is not much more than an attempt to market Mathematica to lazy and failing college students. If that cost, and localization, can be offloaded to LLMs as the universal front end to technical software, it'd free up SWE resources to focus on core functionality.

If Magma, my favorite math/cryptography tool, had an LLM frontend, I could save time wasted onboarding new cryptographers.

https://magma.maths.usyd.edu.au/calc/

Iwan-Zotow•6mo ago
Curious if this could be done for Mathematica. SymPy is kind of ...
georgearvanitis•6mo ago
Live CEOing Ep 910: Design Review for MCP Server Paclet[0] posted yesterday
Hugsun•6mo ago
I was very pleased to discover that Mistral's Le Chat has inbuilt support for python code execution and sympy is importable.

It will regularly use it and reliably when asked to.

crystal_revenge•6mo ago
I really appreciate Stephen's mixture of skepticism combined with genuine interest in experimenting with these tools. Most MCP posts I've read have been so much hype I've been left with no clue what MCP actually does. This is the first article I've read on the topic that earnestly makes me want to start messing around with MCP for fun (and makes it clear how to get started).

It's a bit unfortunate that the field is so dominated by extremes of hype and skepticism, both of which aren't particularly helpful to getting problems really solved.

beastman82•6mo ago
It's just good writing. Funny, insightful, detailed.
mhh__•6mo ago
I like this type of flow.

On tensor notation: Tensor indices aren't bad (a good notation should guide a calculation and they do) but I can't help but feel they're far too error prone.

What are the alternatives? Penrose diagrams?

ogogmad•6mo ago
Abstract index notation. It's completely different!
0cf8612b2e1e•6mo ago
Tangentially, are there any symbolic algebra systems that can handle millions of equations?

I have never used a symbolic algebra system, but came across a problem where I am trying to model a deterministic simulation system. I can write out the computation graph (~20 million equations for final state), but Sympy chokes on seemingly dozens of symbols. No hope of processing the final state or being able to express a simulation state in terms of my desired input variables.

Not sure if my expectations are mismatched with reality, I am hugely bungling the tool, or Sympy has laughable performance vs the more capable commercial options.

6gvONxR4sf7o•6mo ago
Presumably if you have 20 million equations, they came from a program that's has fewer than 20 million moving parts, like if they came from A x = b where the matrix A has 20M entries. The gist is either exploit structure to make a massive number of small equations or keep the symbols in their "natural" form instead of reducing to scalars, and work with more advanced CAS functionality (like, you might have to learn about noncommutative variations on groebner bases). But also, yes sympy is ultra slow with some things.
FilosofumRex•6mo ago
There is no general purpose solver available that can symbolically solve 20M equations, and unfortunately, progress in this field has been excruciatingly slow.

It's highly unlikely it's possible, even in theory. Symbolic solvers must explore many known "routes" to expand and simply given equations, without any theoretical guarantees. Even if you found a symbolic solution to your 20M system, it'd have so many terms in it that you'd have to settle for a numerical approximation, just to make sense of them all.

Numerical solvers are of course, a different matter, altogether.

0cf8612b2e1e•6mo ago
Ahh nuts. I was foolishly optimistic because my experience with SAT solvers has been magical where they can effortlessly chew through huge numbers of constraints. Was thinking that computers are really fast and good at math, surely they can balance a bunch of algebra given some guidance.

Ah well. Will have to resign myself to raw numbers.

FilosofumRex•6mo ago
I can't recommend SAT solvers enough, the CS community isn't familiar with them and don't appreciate their vast improvements in recent years. If you've the luxury of formulating your 20M system in terms of satisfiability problem, it'd well worth a try.

Unfortunately, most problems in physics(field equations), or engineering (Navier Stokes) can't be formulated as satisfiability problems.

rudi_mk•6mo ago
Damn. I started building exactly the same thing a couple weeks ago.

https://github.com/equationscp/equationscp

hosolmaz•6mo ago
It might make more sense to give the model a Jupyter Notebook/code interpreter MCP as a more general case. The environment would have to have sympy, numpy, scipy, matplotlib etc. installed of course
nickysielicki•6mo ago
bit more fleshed out than what I slopped together last month for this: https://github.com/sielicki/dogfood/blob/master/scripts/mcp-...

I've found it useful for thought experiments around trading.

Langjam Gamejam: Build a programming language and then use it to make a game

https://austinhenley.com/blog/langjamgamejam.html
1•azhenley•55s ago•0 comments

VMware isn't budging in its pursuit of Siemens for alleged unpaid licenses

https://www.theregister.com/2025/11/28/vmware_vs_siemens_fresh_filings/
1•ipeev•2m ago•0 comments

Open Source Pledge: Posit contributed $493K to OSS in 12 months ($750K to date)

https://posit.co/blog/posit-open-source-pledge-2025
1•ionychal•3m ago•0 comments

Show HN: Browser Calendar: Track Safari, Chrome, Firefox, Edge & Opera Releases

https://browsercalendar.com/
1•grosmar•4m ago•1 comments

Show HN: Minimalistic hex/binary text visualizer for educational UTF-8 demo

https://chessnawk.vercel.app/tools/hex
2•vitaly-pavlenko•11m ago•0 comments

Jedi Blue

https://en.wikipedia.org/wiki/Jedi_Blue
3•redbell•12m ago•0 comments

Common database for Chat Applications

https://progressdb.dev
1•hasante•14m ago•1 comments

Flight disruption warning as Airbus requests modifications to 6k planes

https://www.bbc.com/news/live/cvg4y6g74ert
3•nrhrjrjrjtntbt•15m ago•1 comments

The Secret Superfood of Thanksgiving

https://www.twopct.com/p/the-secret-superfood-of-thanksgiving
3•bilsbie•16m ago•0 comments

A Deep Dive into the Qualcomm Snapdragon X2 Elite SoC Details

https://www.semiaccurate.com/2025/11/27/a-deep-dive-into-the-qualcomm-snapdragon-x2-elite-soc-det...
2•walterbell•18m ago•0 comments

Own a Graph

https://staysaasy.com/strategy/2025/11/25/own-a-graph.html
2•RyeCombinator•18m ago•0 comments

Indoor Dog Park Directory – Find Climate-Controlled Dog Play Spaces California

https://www.indoordogpark.org
1•mabalal•28m ago•1 comments

The Art of KPop Demon Hunters

https://theartofkpopdemonhunters.com/
1•lehi•29m ago•0 comments

MetaFun: Compile Haskell-like code to C++ template metaprograms

https://gergo.erdi.hu/projects/metafun/
1•todsacerdoti•30m ago•0 comments

Strategic Fabrication in AI Self-Governance: An Empirical Audit of 9 Major LLMs

https://zenodo.org/records/17754943
2•mikeup91•34m ago•1 comments

Ask HN: What is the purpose of all these AI spam comments?

10•GaryBluto•34m ago•4 comments

Google Images: Shirts Without Stripes

https://www.google.com/search?newwindow=1&fbs=&q=shirts%2Bwithout%2Bstripes&sa=X&biw=1152&bih=958...
1•gregsadetsky•34m ago•2 comments

Are Peptide Injections Safe?

https://www.washingtonpost.com/health/2025/11/26/peptides-bodybuilding-injections-side-effects/
1•bookofjoe•37m ago•1 comments

Software Issue Hits Planes

https://news.sky.com/story/airbus-latest-software-issue-hits-thousands-of-planes-13476780
4•scopeh•39m ago•1 comments

Building a Distributed Database in Elixir, Part 3: Storage Layer and Why RocksDB

https://medium.com/@gawry/storage-layer-why-rocksdb-part-3-814e1d24a1a6
5•gawry•43m ago•1 comments

Keeping the Streak Alive

https://quartr.com/insights/edge/keeping-the-streak-alive-the-story-of-duolingo
1•sujayk_33•44m ago•0 comments

Chicago Data Center Overheated–and Shut Down Trade in Key Markets

https://www.wsj.com/finance/cme-options-futures-trading-halted-amid-data-center-issue-16e96ed1
2•perihelions•44m ago•0 comments

Turris Om Nia NG

https://www.discomp.cz/turris-omnia-ng_d130526.html
1•senorqa•47m ago•0 comments

Who's Grading You on Coursera? The Shift from Human Peers to AI

https://www.classcentral.com/report/coursera-peer-assessment-still-broken/
3•raybb•53m ago•0 comments

One point I made that didn't come across: Ilya

https://twitter.com/ilyasut/status/1994424504370581726
2•sabareesh•54m ago•0 comments

In Denmark, 'Night's Watch' Guards Monitor Trump from the Foreign Ministry

https://jen.jiji.com/jc/eng_agt?g=adnkronos&k=20251128KRONOS-202511112509571700_eng
2•SanjayMehta•54m ago•0 comments

The Best Improvement I've made to my Cursor workflow

https://foundinglean.substack.com/p/the-best-improvement-ive-made-to
1•indigodaddy•54m ago•0 comments

CME Group Commodity Futures Trading Halted, Traders Say

https://www.bloomberg.com/news/articles/2025-11-28/cme-group-commodity-futures-trading-halted-tra...
4•petethomas•56m ago•0 comments

Social media algorithms can alter political views, browser extension study shows

https://www.euronews.com/next/2025/11/28/social-media-algorithms-can-alter-political-views-browse...
4•geox•57m ago•0 comments

Ask HN: Why don't closed captions boldface words that are likely to be misheard?

3•amichail•58m ago•1 comments