The Deska blog

Realistic Mock Data by Agent: Beyond Lorem Ipsum

Learn how to generate realistic mock data by agent to improve testing accuracy. Move beyond generic placeholders with AI and modern developer tools.

· 10 min read

Software development often stalls when the gap between empty databases and production reality becomes too wide. Generic placeholders like Lorem Ipsum or repetitive strings like Test User 1 fail to trigger edge cases or validate UI layouts for varied content lengths. The emergence of realistic mock data by agent represents a shift from static libraries toward dynamic, context aware datasets. By using large language models to understand the schema and business logic, developers can create environments that reflect the complexity of the real world before a single user signs up.

The Limitations of Traditional Mocking

For years, developers relied on libraries that provided randomized strings, dates, and integers. While tools like Faker or Chance.js are excellent for basic unit tests, they struggle with relational integrity and semantic meaning. If a field requires a valid professional summary, a random string of Latin words will not help you test a search algorithm or a sentiment analysis component.

Traditional methods often result in data that is too clean or too uniform. Real world data is messy. It contains international characters, inconsistent capitalization, and varied lengths that can break CSS grid layouts. Manually writing scripts to simulate these nuances is time consuming and difficult to maintain as your API evolves.

How Agents Change the Data Generation Workflow

An agentic approach to data generation involves using models capable of reasoning about your code. Instead of writing a loop that creates one hundred users, you describe the persona, the geographic distribution, and the specific constraints of your domain. The agent handles the creation of these interconnected records.

  1. Schema Analysis: The agent reads your TypeScript interfaces, database migrations, or Protobuf files.
  2. Contextual Seeding: You provide a high level prompt describing the business scenario, such as a busy e-commerce site during a holiday sale.
  3. Logical Consistency: The agent ensures that order dates are after user registration dates and that total prices match the sum of line items.
  4. Exporting: The data is formatted as JSON, SQL inserts, or CSV files ready for import.

Comparing Approaches to Test Data

MethodSemantic AccuracySetup EffortRelational Integrity
Hand coded JSONHighVery HighManual
Library (Faker.js)LowLowBasic
Agentic GenerationHighMediumAutomated
Production ScrubbingHighestHighHigh

While scrubbing production data is often considered the gold standard, it comes with significant privacy risks and compliance hurdles. An agent can generate synthetic data that mimics the statistical properties of production without ever touching sensitive user information.

Using Deska for Agentic Data Generation

Deska provides an environment where these agents can operate directly alongside your code. Because the application is local-first, you can feed your schema files to an agent without uploading your proprietary architecture to a third party cloud. The infinite canvas allows you to set up a workflow where the data generation happens in one panel while you observe the effects in another.

Inside the workspace, you can open multiple panels to manage this process. For instance, you could have a terminal running a local database, a code editor showing your Prisma schema, and a coding agent like Claude Code or Codex CLI ready to receive instructions.

The Ask Deska Workflow

You can use Ask Deska to coordinate the entire setup. By using voice or chat, you can command the workspace to open the necessary files and initiate a data generation session. The agent can then generate a comprehensive seed.ts file or a set of JSON files directly in your project folder. Since all files stay on your machine, there is no latency or security overhead associated with transferring large datasets between environments.

If you need to step away from your workstation, you can use the mobile app to monitor the progress of a long running generation script. The secure relay allows you to check the logs on your phone, ensuring the agent has not encountered a validation error while you are away.

Implementing Realistic Logic

When generating realistic mock data by agent, it is important to provide specific constraints. Instead of asking for users, ask for a list of fifty users from professional backgrounds in Western Europe. Specify that twenty percent should have missing profile pictures and five percent should have extremely long surnames to test layout overflows.

This level of specificity allows you to build more resilient applications. You are no longer just testing if your app works. You are testing how your app responds to the unpredictable nature of human input.

Advanced Data Scenarios

Agents are particularly useful for complex state transitions. Consider a fintech application where you need to test a complicated loan approval flow. An agent can generate a sequence of events: initial application, credit check, document upload, and supervisor approval. Each event can be timestamped logically and linked to specific UUIDs across different tables.

This type of orchestration is difficult with standard mocking libraries but relatively simple for a coding agent that understands the relationship between your services. You can view these complex relationships across your canvas by arranging your browser widgets and logs to see how the generated data propagates through your system.

FAQ

How to generate realistic mock data by agent for large datasets?

To generate large volumes of data, it is best to have the agent write a reusable script rather than generating the raw data in the chat window. The agent can produce a Python or Node.js script that utilizes steaming to write millions of rows to a CSV or database. This avoids token limits and keeps the process efficient.

Can AI agents handle relational database integrity?

Yes, agents can analyze foreign key constraints in your SQL schema. By providing the agent with your schema.sql or an ORM definition, you can instruct it to generate parent and child records in the correct order to avoid constraint violations. This is a significant advantage over randomized generators that lack structural awareness.

Are coding agents safe for sensitive data structures?

When using agents within a local-first environment, your code remains on your machine. However, the prompts you send to the LLM are processed by the provider. It is important to avoid pasting actual production data into prompts. Use your schema definitions and architectural descriptions instead to generate synthetic but structurally identical data.

Getting Started with Deska

If you want to move beyond basic placeholders and start using agents to build better test environments, you can download the free desktop app for your operating system. By combining the power of AI coding agents with a flexible, local workspace, you can create data that truly reflects the challenges your application will face in production. Explore our pricing page to see the different tiers for API key management and inference options.

💡 Ideas+🐛 BugsSuggest a feature or report a bug