Remix.run Logo
stopachka 3 days ago

Oh, interesting! I just took a look.

I updated the system prompt a bit, here's a version of your app that's working with it:

https://brave-elm-7m6ar8.manyminiapps.com/

(The chat: https://www.manyminiapps.com/?c=1a5d3481-d2e2-414c-a7c3-4d0c...)

---

For the curious, the issue was that the LLM originally decided to write the query:

```

    const { data } = db.useQuery({
      worlds: {
        $: { order: { createdAt: 'desc' } },
        snapshots: {
          $: { order: { timestamp: 'desc' }, limit: 1 }
        }
      }
    });
```

But we don't support limits on subqueries yet.

We had a specific note in the system prompt warning the LLM to avoid this. Interestingly, _removing_ the warning fixed the issue. I guess it's kind of like telling someone to not think of a red elephant.

NoSalt 2 days ago | parent [-]

Woah ... I am now 100% impressed!!! This is absolutely FANTASTIC!!!

stopachka 2 days ago | parent [-]

Thank you for the kind words!