SShortSingh.
Back to feed

Developer builds Magic: The Gathering rules agent and tests it against keyword search

0
·5 views

A developer created JudgeStack, an AI agent that answers Magic: The Gathering rules questions by identifying the correct authoritative source for each query type, such as Oracle card text, Comprehensive Rules, or dated format announcements. The project was submitted to the DEV x Sanity Challenge and uses two Sanity Context MCP endpoints to separate structured document queries from the full Comprehensive Rules file. To evaluate its accuracy, the developer ran a blind comparison between basic keyword retrieval and the structured Sanity Context approach across ten previously unseen questions. The structured system answered 9 out of 10 questions correctly, while keyword retrieval managed only 1 out of 10, with 7 answers relying on evidence that was never actually retrieved. The corpus underlying JudgeStack spans 496 documents covering cards, printings, legality claims, rulings, and wording differences, with IP considerations limiting republication of the full rules text.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer shares lessons from deploying a containerized couples app on Google Cloud Run

A developer built a private couples web app featuring movie suggestions, trivia, and AI-powered adventures, using a Svelte and Node.js stack with MongoDB Atlas for storage. The app was deployed to Google Cloud Run inside a single Docker container built across three stages, keeping the final image lean by excluding build tooling. Google Cloud Run was chosen specifically for its scale-to-zero capability, ensuring zero cost during idle periods — critical for a two-user application. A Cloud Build trigger was configured to automatically redeploy the service on every git push, with each revision tagged with a commit SHA for traceability. The app ran live for about a month before being scaled down, with the developer documenting key architectural and deployment decisions for others adopting the serverless-container model.

0
ProgrammingDEV Community ·

Developer builds eval harness to measure prompt-injection defenses in LLM agent

A software developer created a LangGraph-based travel concierge agent and deliberately tested it against five categories of prompt-injection attacks, including RAG data poisoning and system-prompt leakage. To move beyond gut-feel assessments, they built a structured evaluation harness consisting of 35 prompts — 25 attack scenarios and 10 benign controls — paired with a two-layer judging system. The judge combines deterministic counters, such as checking whether a malicious email was actually sent, with a fallback LLM judge for attack classes that leave no direct tool trace. Results are persisted after every sample so that rate-limit interruptions on Groq's free-tier API do not force a full restart, and all runs use fixed temperature and seed for direct comparability. The exercise revealed that quantifying both attack success rates and false positives is essential, since a defense that blocks all attacks but disrupts legitimate use renders the product unusable.

0
ProgrammingDEV Community ·

How One Developer Built a Sandboxed Firefox Profile That Leaves No Trace

A developer running Pop!_OS 24.04 set up a sandboxed Firefox profile using Firejail to safely open links from untrusted sources without risking the rest of their system. The goal was to retain deliberate configurations like extensions and a Gmail login, while ensuring no browsing activity persisted after each session. A key challenge was a path change in Firefox 150+, which moved profile directories to an XDG location that Firejail's default config did not whitelist, causing Firefox to silently create a throwaway profile each launch. After testing three approaches, the final solution combined a persistent sandbox profile, Firefox's native permanent private browsing mode enforced via a user.js file, and a custom Firejail whitelist scoped only to that profile. A wrapper launch script prevents accidental Safe Mode by clearing stale lock files and blocks the sandbox from opening if the profile is already in use.

0
ProgrammingDEV Community ·

Niche Collector App Tracks Hobby Portfolio Value Using Structured Data and GROQ Queries

A developer has built Niche Collector, an open-source portfolio tracker for hobbyists collecting items such as Hot Wheels, Gunpla kits, and mechanical keyboards. The app compares purchase prices against current market values by pulling price history from Indonesian marketplaces like Tokopedia and Shopee. A key feature flags suspiciously high listings as outliers and excludes them from median valuations, keeping portfolio calculations accurate. The project was submitted as part of a Sanity CMS developer challenge and is built on Next.js with Sanity's structured content backend. All financial aggregations are computed server-side using GROQ queries rather than client-side JavaScript, demonstrating use cases that full-text search cannot handle.