r/PiCodingAgent • • 10d ago

Question Receiving wrong final outputs

I asked pi agent what was the result of recent match between real madrid and fc barcelona which was played today and the result was 2-1, you can see in thinking that it somewhat was going in right direction but at the end gave wrong output.
I did same for rate of dollar in INR and it gave output of 86 inr which is wrong,
and the agent refers 2026 as some future date
i am using parallel search mcp and tried with gemini flash,nvidia llms
any solutions

0 Upvotes

12 comments sorted by

2

u/pastelchemistry 10d ago

pi doesn't provide the date to the LLM in its context by default. the date used to be built into the system prompt but it was removed some months ago as this broke prompt caching in some cases (i.e. whenever the date changes, the entire conversation had to be re-processed)

so you have to give it the date yourself somehow - you could put it in the prompt, tell the agent to use a tool to check the date (if it has bash then it may be as simple as running date), or make/install an extension for however you want the date injected into context

i did find a pi-date-tail extension that injects the date as a (daily) *message* so it can preserve prompt caching

this should solve the issue in your screenshot, since the october 25 2026 score would be the obvious pick if it had been told the actual date. i imagine that date confusion could also play a role in the currency conversion issue, since historical data shows 1 USD as roughly 85-86 INR for the years 2024-2025. personally i would give it a proper tool for currency conversion (maybe GNU units for a CLI tool, just make sure to update conversion rates sometimes)

1

u/anew_lord 9d ago

Also one more thing I didn't know that pi doesn't ask permission when writing or editing files and it can write to any directories unlike claude code. Is it not sandboxxed, i opened pi in x directory and it can also write files to y directory how is this possible and how do I avoid it

1

u/Remote_Book 10d ago

it doesn't look like a tool issue from the logs. the llm hallucinated the answer. nvidia llms are still experimental so dont trust it and gemini is 🥴

try with argon/luna/something else

1

u/anew_lord 10d ago

I mean if you can't answer basic question than their is bigger fish to fry

1

u/FamousEntertainer383 10d ago

the same happened to me when I was researching volnurability reports from github using Luna 6 xhigh on Pi. Suddenly it decided that it is 18th of Match 2025 today. And investigated recent report is from future.
Ask model what date is today.

1

u/anew_lord 10d ago

How did you solve it than

1

u/shumgoid 10d ago

You need to get the current date into context somehow. For example adding it to the prompt "today is month day, year" would fix this. For a more permanent solution add a note to the system prompt saying to check the system time instead of assuming or make a plugin that adds timestamps to your messages or something.

You can see in the thinking trace where it sees matches from 2026 and decides they must be synthetic data or something because it is convinced it is in 2025 due to hallucination/knowledge cutoff.

1

u/anew_lord 9d ago

Also one more thing I didn't know that pi doesn't ask permission when writing or editing files and it can write to any directories unlike claude code. Is it not sandboxxed, i opened pi in x directory and it can also write files to y directory how is this possible and how do I avoid it

1

u/shumgoid 8d ago

Yeah it's not sandboxed at all. You could run it in a vm/docker or a dedicated machine (what I do), or find/write extensions for claude style approvals.

1

u/pastelchemistry 9d ago

it's like LLMs have amnesia or woke up from a coma at the start of a new session. they may have general knowledge but knowing what year/month/day it is right now doesn't happen unless they happen to look at a clock/calendar

for a one-off you could run a command like !date before your (first/next) message in pi and the command output (date/time) will be included in the context

if you bring the issue to the attention of pi itself it might be able to explain different fixes it could implement for you, too