ai_vectorAI Vector

Mock Jutsu HOW-TO | UK

The ai_vector function within the mock-jutsu library is a specialised tool designed for developers and data engineers working with large language models and vector databases. It generates high-quality synthetic embeddings that mimic the output of modern machine learning models, providing a reliable source of mock data for development and staging environments. By default, the function produces a 384-dimensional array, aligning with industry-standard embedding models like Sentence-BERT. This allows engineers to populate their systems with realistic numerical representations without the latency or cost associated with calling live inference APIs during the early stages of a project.

Under the hood, the ai_vector utility employs a rigorous mathematical approach to ensure the generated test data is suitable for similarity searches. Every generated array is L2-normalised, resulting in a unit vector where the Euclidean norm equals one. This precision is critical for testing systems that rely on cosine similarity or dot product calculations, as it ensures the mock-jutsu output behaves exactly like real-world embeddings from providers like OpenAI or Hugging Face. For those working with different architectures, the dimensionality is fully configurable via the --dims argument, allowing for seamless scaling from 128 up to 3072 dimensions to match specific model requirements.

Integration is straightforward across various technical workflows, whether you are using the Python API, the command-line interface, or performance testing tools like JMeter. Developers can use jutsu.generate('ai_vector') to programmatically build comprehensive test suites for vector search engines such as Milvus, Weaviate, or Pinecone. This makes it an essential component for stress-testing indexing algorithms and verifying that search retrieval logic handles high-dimensional data correctly. By using synthetic test data, teams can identify potential bottlenecks in their data pipelines and validate schema enforcement long before moving to production.

Ultimately, the primary benefit of using ai_vector is the significant acceleration of the development lifecycle. It removes the dependency on external AI providers during the testing phase, ensuring that CI/CD pipelines remain fast, deterministic, and cost-effective. Whether you are benchmarking a new similarity search algorithm or simply need to fill a database for a frontend demonstration, mock-jutsu provides the flexibility and precision required for modern AI-driven application development. This ensures that your infrastructure is robust, scalable, and ready to handle the complexities of real-world vector embeddings.

CLI Usage
mockjutsu generate ai_vectormockjutsu bulk ai_vector --count 10mockjutsu export ai_vector --count 10 --format jsonmockjutsu export ai_vector --count 10 --format csvmockjutsu export ai_vector --count 10 --format sqlmockjutsu generate ai_vector --dims int
Python API
from mockjutsu import jutsujutsu.generate('ai_vector')jutsu.bulk('ai_vector', count=10)jutsu.template(['ai_vector'], count=5)# with --dims parameterjutsu.generate('ai_vector', dims='int')
JMeter
${__mockjutsu_ai(ai_vector)}${__mockjutsu_ai(ai_vector:64)}# JMeter Function: __mockjutsu_ai# Parameter 1: ai_vector OR ai_vector:# Qualifier values: dimensions (int)# Parameter 2: (not required for this function)
REST API
GET /generate/ai_vector# → {"type":"ai_vector","result":"...","status":"ok"}GET /bulk/ai_vector?count=10POST /template {"types":["ai_vector"],"count":1}

Parameters

Parameter Values Description
--dims int Vector dimensions

Other Languages