<story><title>Comparing our Rust-based indexing and querying pipeline to Langchain</title><url>https://bosun.ai/posts/rust-for-genai-performance/</url></story><parent_chain></parent_chain><comment><author>pjmlp</author><text>Most of the Python libraries, are anyway bindings to native libraries.&lt;p&gt;Any other ecosystem is able to plug into the same underlying native libraries, or even call them directly in case of being the same language.&lt;p&gt;In a way it is kind of interesting the performance pressure that is going on Python world, otherwise CPython folks would never reconsider changing their stance on performance.</text></comment>
<story><title>Comparing our Rust-based indexing and querying pipeline to Langchain</title><url>https://bosun.ai/posts/rust-for-genai-performance/</url></story><parent_chain></parent_chain><comment><author>lmeyerov</author><text>At least for Louie.ai, basically genAI-native computational notebooks,  where operational analysts ask for intensive analytics tasks for like pulling Splunk&amp;#x2F;Databricks&amp;#x2F;neo4j data, getting it wrangled in some runtime, cluster&amp;#x2F;graph&amp;#x2F;etc it, and generate interactive viz, Python has ups and downs:&lt;p&gt;On the plus side, it means our backend gets to handle small&amp;#x2F;mid datasets well. Apache Arrow adoption in analytics packages is strong, so zero copy &amp;amp; and columnar flows on many rows is normal. Pushing that to the GPU or another process is also great.&lt;p&gt;OTOH, one of our greatest issues is the GIL. Yes, it shows up a bit in single user code, and not discussed in the post, especially when doing divide-and-conquer flows for a user. However, the bigger issue is in stuffing many concurrent users into the same box to avoid blowing your budget. We would like the memory sharing benefits of threaded, but because of the GIL, want the isolation benefits of multiprocess. A bit same-but-different, we stream results to the browser as agents progress in your investigation, and that has not been as smooth as we have done with other languages.&lt;p&gt;And moving to multiprocess is no panacea. Eg, a local embedding engine is expensive to do in-process per worker because modern models have high RAM needs. So that biases to using a local inference server for what is meant to be an otherwise local call, which is doable, but representative of that extra work needed for production-grade software.&lt;p&gt;Interesting times!</text></comment>