Inspiration

Every student knows the pain: you need 10 peer-reviewed sources by tomorrow, but ChatGPT gives you citations that don't exist. We built PolyMind because we were tired of AI tools that sound confident while hallucinating DOIs.

What it does

PolyMind turns a research question into a verified, cited report through four specialized AI agents — each running a different open-source model via Featherless.ai:

  1. Scout (Qwen 7B) — searches arXiv and Semantic Scholar for relevant papers
  2. Analyst (Llama 3.1 8B) — extracts claims, identifies conflicts and gaps
  3. Critic (DeepSeek-R1 8B) — validates every claim against source evidence; routes unsupported claims back for re-evidence
  4. Synthesizer (Qwen 72B) — streams a structured Markdown report with inline citations and BibTeX export

Every citation is verified against the CrossRef REST API in real time. The entire collaboration is streamed live to your browser via Server-Sent Events.

How we built it

  • Frontend: Next.js 14 (App Router), Tailwind CSS, Framer Motion, and custom shadcn/ui-style components for a dark academic aesthetic
  • Backend: Next.js API Routes with TypeScript for type-safe endpoints
  • AI Inference: Featherless.ai OpenAI-compatible API with 4 distinct open-source models and intelligent retry logic
  • Citation Verification: CrossRef REST API + Semantic Scholar Graph API for real DOI resolution
  • Real-time Streaming: Server-Sent Events (SSE) pipeline streaming agent progress live
  • Persistence: PostgreSQL with Drizzle ORM for session state and event replay
  • Vector Search: Qdrant (Docker) for semantic retrieval of chunked paper passages
  • Deployment: Docker Compose with one-command startup

Challenges we ran into

Multi-model prompt engineering: Each of the four models has different instruction-following behavior. Tuning the Critic to be adversarial without being destructive took 6 iterations.

SSE state synchronization: Keeping the frontend event stream in sync with the backend agent graph while supporting re-evidence loops required careful checkpoint design.

Citation verification latency: CrossRef API calls added 200–800ms per source. We parallelized verification with Promise.all() and added in-memory caching to keep the swarm moving.

Accomplishments that we're proud of

  • Real-time multi-agent visualization: Four agent cards light up in sequence as the swarm executes, with live event timestamps
  • Zero hallucination policy: Every DOI is resolved against CrossRef before it reaches the final report
  • Iterative re-evidence: The Critic can literally send the Scout back for more sources — up to 3 passes
  • One-command Docker: docker-compose up --build starts the entire stack

What we learned

Multi-model ensembles dramatically improve citation accuracy compared to single-model approaches. The adversarial Critic catches hallucinations that would otherwise slip through a standard RAG pipeline. We also learned that presentation matters as much as code — 20 of 60 judging points are on demo and documentation.

What's next for PolyMind

  • Zotero and Mendeley export integration
  • PDF upload for custom corpus analysis
  • Collaborative team workspaces for research groups
  • PubMed and IEEE Xplore source expansion

Built With

Share this project:

Updates