Tradoing

Market Research · AI

Why language models invent P/E ratios

Ask a general-purpose chatbot for a company’s price-to-earnings ratio and you will usually get a number. It will be formatted correctly, quoted with confidence, and often wrong. The unsettling part is not that it is sometimes wrong. It is that the wrong answer looks exactly like the right one.

This post explains why that happens, why it is a property of how the models work rather than a bug that scale will remove, and why the fix is sourcing.

A model predicts text, not facts

A language model is trained to continue text. Given the tokens so far, it produces a probability distribution over what comes next and samples from it. When the prompt is “Apple’s trailing P/E is”, the model does not look up Apple’s earnings and price. It reaches for the digits that most plausibly follow that phrase, given everything it saw in training. A plausible-looking number is precisely what the objective rewards.

Recent work from OpenAI puts this cleanly. In Why Language Models Hallucinate, Kalai and co-authors argue that “language models hallucinate because the training and evaluation procedures reward guessing over acknowledging uncertainty,” and that at the pretraining stage, “if incorrect statements cannot be distinguished from facts, then hallucinations in pretrained language models will arise through natural statistical pressures.” A confident guess scores better on most benchmarks than an honest “I do not know,” so the model learns to guess.

The broader research literature reached a similar conclusion earlier. The Survey of Hallucination in Natural Language Generation (Ji et al., ACM Computing Surveys, 2023) catalogues how generation systems produce fluent output that is unfaithful to any source, across summarization, dialogue, and question answering. Fluency and factuality are different targets, and the training objective optimizes the first.

The incentive, not just the accident

It is tempting to read a fabricated figure as a random slip. The OpenAI analysis frames it as something more stubborn: the way models are graded actively teaches the behavior. Most benchmarks score answers as simply right or wrong, and under that rule an abstention scores the same as an error, zero, while a lucky guess scores full marks. The authors put it bluntly: “binary grading does not measure hallucination.” A student who never leaves a question blank will beat an honest one on a test that awards nothing for “I do not know,” and the model is that student.

Their proposed remedy is to change the grading, not just the model: penalize confident errors more heavily than expressions of uncertainty, and give partial credit for a well-placed “I am not sure,” so that guessing stops being the dominant strategy. That is a fix for how we evaluate models. It is not a switch you can flip on the assistant answering your question today, which is why the problem shows up in production even in capable systems.

Why finance is the worst case

For casual prose, a plausible-but-wrong sentence is a minor annoyance. For markets it is a liability, for three reasons.

The usual advice, verify everything it tells you, is not a workflow. If every figure needs a manual re-check, the model has added a step rather than removed one.

Scale does not close the gap

A tempting response is that bigger models will simply memorize more and guess less. Memorization helps at the margins, but it does not change the shape of the problem. The model still has no access to the current price, the latest filing, or the exact share count at the moment you ask. Those facts live outside its weights and change after training ends. No amount of parameters retrieves a number that was never in the training data or that has moved since. The OpenAI analysis frames the persistence of hallucination as an incentive problem, not a capacity one: models stay good at confident guessing because that is what the scoring rewards.

The structural fix is retrieval and tool use

If the failure is that the model produces numbers it should be retrieving, the fix is to stop asking it to produce them. Give it the data instead.

This is the idea behind retrieval-augmented generation. In Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (Lewis et al., NeurIPS 2020), the model is paired with a retrieval step that pulls relevant documents before generating, which the authors show produces “more specific, diverse and factual” output than a parametric model alone. The number comes from a source; the model’s job is to read and explain it, not to author it.

Tool use extends the same principle to live data and computation. Modern models expose function calling, a mechanism that lets a model hand off to your code: instead of predicting a P/E, the system fetches the price and the earnings from a named data provider, computes the ratio in code, and hands the model the result to write around. The figure is data. It was never the model’s to invent.

The distinction matters because it is verifiable at the source, not on trust. A sourced answer can be wrong, if the upstream data is stale or the calculation is misspecified, but it is wrong in a way you can trace and check. A hallucinated answer cannot be traced anywhere, because it was assembled from probabilities.

What this means for a research assistant

This is the whole design premise behind Tradoing. The model does not generate the numbers; it relays them. When you ask a question, the system decides which data it needs, fetches it from real market and economic sources, runs the calculation in code, and only then lets the model write the answer around the result. When the data is not available, it says so rather than filling the gap. Invention is not discouraged, it is removed from the path.

A model that predicts a P/E and a system that retrieves one can produce the same-looking number. Only one of them can tell you where it came from.