Show HN: Pyversity – Fast Result Diversification for Retrieval and RAG

Show HN (score: 13)
Found: October 19, 2025
ID: 1964

Description

Other
Show HN: Pyversity – Fast Result Diversification for Retrieval and RAG Hey HN! I’ve recently open-sourced Pyversity, a lightweight library for diversifying retrieval results. Most retrieval systems optimize only for relevance, which can lead to top-k results that look almost identical. Pyversity efficiently re-ranks results to balance relevance and diversity, surfacing items that remain relevant but are less redundant. This helps with improving retrieval, recommendation, and RAG pipelines without adding latency or complexity.

Main features:

- Unified API: one function (diversify) supporting several well-known strategies: MMR, MSD, DPP, and COVER (with more to come)

- Lightweight: the only dependency is NumPy, keeping the package small and easy to install

- Fast: efficient implementations for all supported strategies; diversify results in milliseconds

Re-ranking with cross-encoders is very popular right now, but also very expensive. From my experience, you can usually improve retrieval results with simpler and faster methods, such as the ones implemented in this package. This helps retrieval, recommendation, and RAG systems present richer, more informative results by ensuring each new item adds new information.

Code and docs: github.com/pringled/pyversity

Let me know if you have any feedback, or suggestions for other diversification strategies to support!

More from Show

Show HN: Commit-based code review instead of PR-based

Show HN: Commit-based code review instead of PR-based Hi HN,<p>I’m experimenting with commit-based code review as an alternative to PR-based review.<p>Instead of analyzing large PR diffs, this reviews each commit incrementally, while context is still fresh. It’s fully configurable and intentionally low-noise, high signal - focused on catching issues that tend to slip through and compound over time.<p>The goal isn’t to replace CI or PR review, but to move some feedback earlier:<p>risky changes hidden in small diffs<p>architectural or consistency drift<p>performance or security footguns<p>Happy to answer questions

Show HN: Xkcd #2347 lived in my head, so I built the dependency tower for real

Show HN: Xkcd #2347 lived in my head, so I built the dependency tower for real I finally got tired of XKCD #2347 living rent-free in my head, so I built Stacktower: a tool that takes any real package’s dependency graph and turns it into an actual tower of bricks. Along the way I had to wrestle some surprisingly spicy problems.<p>Full blog post here: <a href="https:&#x2F;&#x2F;stacktower.io" rel="nofollow">https:&#x2F;&#x2F;stacktower.io</a><p>The result is half visualization tool, half love letter to the chaos of modern dependency trees. Open-source, works with PyPI, Cargo, npm, and more.<p>Code: <a href="https:&#x2F;&#x2F;github.com&#x2F;matzehuels&#x2F;stacktower" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;matzehuels&#x2F;stacktower</a>

Show HN: Flowctl – Open-source self-service workflow automation platform

Show HN: Flowctl – Open-source self-service workflow automation platform Flowctl is a self-service platform that gives users secure access to complex workflows, all in a single binary. These workflows could be anything, granting SSH access to an instance, provisioning infra, or custom business process automation. The executor paradigm in flowctl makes it domain-agnostic.<p>This initial release includes: - SSO with OIDC and RBAC - Execution on remote nodes via SSH (fully agentless) - Approvals - Cron-based scheduling - Flow editor UI - Encrypted credentials and secrets store - Docker and Script executors - Namespaces<p>I built this because I needed a simple tool to manage my homelab while traveling, something that acts as a UI for scripts. At work, I was also looking for tools to turn repetitive ops&#x2F;infra tasks into self-service offerings. I tried tools like Backstage and Rundeck, but they were either too complex, or the OSS versions lacked important features.<p>Flowctl can simply be described as a pipeline (like CI&#x2F;CD systems) that people can trigger on-demand with custom inputs.<p>Would love to hear how you might use something like this!<p>Demo - <a href="https:&#x2F;&#x2F;demo.flowctl.net" rel="nofollow">https:&#x2F;&#x2F;demo.flowctl.net</a><p>Homepage - <a href="https:&#x2F;&#x2F;flowctl.net" rel="nofollow">https:&#x2F;&#x2F;flowctl.net</a><p>GitHub - <a href="https:&#x2F;&#x2F;github.com&#x2F;cvhariharan&#x2F;flowctl" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;cvhariharan&#x2F;flowctl</a>

Show HN: FLE v0.3 – Claude Code Plays Factorio

Show HN: FLE v0.3 – Claude Code Plays Factorio We&#x27;re excited to release v0.3.0 of the Factorio Learning Environment (FLE), an open-source environment for evaluating AI agents on long-horizon planning, spatial reasoning, and automation tasks.<p>== What is FLE? ==<p>FLE uses the game Factorio to test whether AI can handle complex, open-ended engineering challenges. Agents write Python code to build automated factories, progressing from simple resource extraction (~30 units&#x2F;min) to sophisticated production chains (millions of units&#x2F;sec).<p>== What&#x27;s new in 0.3.0 ==<p>- Headless scaling: No longer needs the game client, enabling massive parallelization!<p>- OpenAI Gym compatibility: Standard interface for RL research<p>- Claude Code integration: We&#x27;re livestreaming Claude playing Factorio [on Twitch](<a href="http:&#x2F;&#x2F;twitch.tv&#x2F;playsfactorio" rel="nofollow">http:&#x2F;&#x2F;twitch.tv&#x2F;playsfactorio</a>)<p>- Better tooling and SDK: 1-line CLI commands to run evaluations (with W&amp;B logging)<p>== Key findings ==<p>We evaluated frontier models (Claude Opus 4.1, GPT-5, Gemini 2.5 Pro, Grok 4) on 24 production automation tasks of increasing complexity.<p>Even the best models struggle:<p>- Most models still rely on semi-manual strategies rather than true automation<p>- Agents rarely define helper functions or abstractions, limiting their ability to scale<p>- Error recovery remains difficult – agents often get stuck in repetitive failure loops<p>The performance gap between models on FLE correlates more closely with real-world task benchmarks (like GDPVal) than with traditional coding&#x2F;reasoning evals.<p>== Why this matters ==<p>Unlike benchmarks based on exams that saturate quickly, Factorio&#x27;s exponential complexity scaling means there&#x27;s effectively no performance ceiling. The skills needed - system debugging, constraint satisfaction, logistics optimization - transfer directly to real challenges.<p>== Try it yourself ==<p>&gt;&gt;&gt; uv add factorio-learning-environment<p>&gt;&gt;&gt; uv add &quot;factorio-learning-environment[eval]&quot;<p>&gt;&gt;&gt; fle cluster start<p>&gt;&gt;&gt; fle eval --config configs&#x2F;gym_run_config.json<p>We&#x27;re looking for researchers, engineers, and modders interested in pushing the boundaries of agent capabilities. Join our Discord if you want to contribute. We look forward to meeting you and seeing what you can build!<p>-- FLE Team

No other tools from this source yet.