Home /Modules/artificial-intelligence/README.md

README.md

artificial-intelligence/large-language-models/reasoning/README.md · 41 line(s) · markdown

Reasoning demo

An end-to-end demonstration of the Reasoning Language Model layer (../large_language_models_reasoning.h). See ../REASONING.md for the design.

reasoning_demo.c wires two illustrative pieces — no trained model, no network, no weights — to the reasoning engine:

Build and run

cc -std=c11 -O2 -Wall -Wextra -pedantic \
   ../large_language_models.c \
   ../large_language_models_reasoning.c \
   ../large_language_models_capacity.c \
   reasoning_demo.c -o reasoning_demo
./reasoning_demo

What it shows

  1. Mathematics (verified, with backtrack). The stub proposes "360 degrees"; the verifier refutes it; the engine backtracks, proves "180 degrees" (SUPPORTED), and commits a verified conclusion. Run with require_verified=1, so an unsound path would fail rather than be accepted.
  2. Philosophy (nuanced, tentative). The engine decomposes the question, surfaces an objection, and commits an honest, tentative position with its caveat intact — no proof-claim on a contestable question.
  3. Model-capacity budgets. A table shows how a user-declared model size across the 2–16 GB envelope scales the reasoning budget (context, steps, backtracks). The model itself is the user's choice; nothing is shipped.

The demo is a schema/behavior fixture for the control loop, not a trained model. To reason for real, implement sllm_backend against an actual model and supply a sllmr_verifier (for math/logic, a bridge to lib/deliberation).