vinicius-piassa/rinha-backend-2026-go — reverse-engineered prompt
Reverse engineered prompt
Build me a Go submission for Rinha de Backend 2026 that exposes a very fast fraud detection API. It should accept transaction requests, turn each request into a small numeric vector, compare it against a prebuilt fraud index using nearest neighbor search, and return a fraud verdict based on the 5 closest matches.
Keep it pure Go with no web framework. I want a tiny TCP load balancer on port 9999 that hands connections to two API workers, and the workers should parse simple HTTP requests, run the search, and reply as fast as possible. Include a tool that can build the binary index files from the reference corpus, split by the transaction flags so searches only scan the right partition.
Please include Docker and docker compose so it runs as 1 load balancer plus 2 API services under tight CPU and memory limits. Optimize for low allocations and predictable latency. Use Go 1.26 SIMD intrinsics if needed, and look up the current docs online if you need to.
Want more depth? Deep Reverse