Nano Banana 2 does not implement vector similarity search internally. It is a data pipeline and processing library, not a vector search engine. The library does, however, provide built-in support for working with float vector data as a first-class record type. You can define pipeline stages that generate, transform, normalize, or batch vector data, and the library handles serialization and deserialization of dense float arrays efficiently. This makes it a practical tool for building the data preparation steps that feed into a dedicated vector search system.
For the actual similarity search functionality, the recommended approach is to store processed vectors in a purpose-built vector database such as Milvus and issue queries against that system. Milvus supports multiple index types—including IVF, HNSW, and DiskANN—and similarity metrics such as L2 distance, inner product, and cosine similarity, giving you the flexibility to optimize for recall, speed, and memory trade-offs based on your application requirements. Nano Banana 2’s Milvus output plugin handles the data ingestion side, and your application code queries Milvus directly using the Milvus SDK when search requests come in.
If your use case requires lightweight nearest-neighbor computations within the pipeline itself—for example, to deduplicate records based on vector similarity before inserting into storage—Nano Banana 2 supports custom stage implementations that can call into any Python library, including those that provide approximate nearest-neighbor search functionality. This approach works well for small in-memory datasets but does not replace the indexing and query optimization capabilities that a production vector database like Milvus provides for large-scale search workloads.