Analyzing data with AI agents

Analyzing data with AI agents

The Fifth Elephant Hyderabad meet-up

Anand S

Anand S

@sanand0 Speaker

Analyzing data with AI agents - summary

Submitted Mar 22, 2025

The talk focused on advancements in Artificial Intelligence (AI), particularly in the areas of image generation, content validation, structured data processing, and AI evolution.

AI image generation and editing

One of the key discussions revolves around AI’s ability to generate and modify images. Anand showed Google AI Studio where Gemini Flash 2.0 (Image Generation) took an image of croissants and added chocolate drizzle while maintaining the shape and structure of the original. This demonstrated AI’s capacity for precise image modifications. Furthermore, AI can edit existing images based on human or automated prompts, enhancing creative workflows and enabling rapid prototyping.

Anand also discussed the challenges AI faces in generating text within images. When designing posters, one of the main issues is ensuring that the AI-generated text aligns correctly within the template. To improve accuracy, AI models must be fine-tuned to recognize specific design constraints and typography requirements.

Demo | Source

AI validation and compliance checking

Anand then transitioned to evaluating AI’s role in validation processes, particularly in contract analysis (source). AI can be trained to assess legal documents by checking for compliance with predefined guidelines. For example, a publishing contract may contain clauses about copyright ownership, deadlines, and financial audits. The AI model analyzes whether these clauses exist, highlights missing elements, and flags potential breaches.

By automating contract review, AI can significantly reduce the time required for legal assessments while improving accuracy. Anand emphasized how such technology can be applied across various domains, from legal reviews to policy enforcement in enterprises.

Structured content generation and iterative refinement

Another major focus of the talk is AI’s ability to transform complex content into more structured and simplified formats. Anand introduced an example (source) involving clinical trial protocols. In this scenario, the AI model receives a dataset containing complex trial descriptions and is tasked with converting them into more digestible summaries.

The process involves several steps:

  • Generating a structured prompt – AI learns from multiple examples to understand the expected output format.
  • Generating outputs – the AI model produces responses based on the provided prompt.
  • Validation and iterative refinement – the output is checked for completeness and correctness. If it falls short, AI refines the prompt and regenerates the text.

This structured approach ensures that AI-generated content remains accurate and aligned with user expectations. Anand highlighted how such methodologies can be applied to various domains, including medical research, policy documentation, and financial reporting.

AI-driven data analysis and insight generation

The talk then explored AI’s role in data analysis. Anand presented an example (source) where AI analyzes an employee database to determine salary disparities between different genders. AI can identify patterns and generate insights based on predefined queries, such as comparing salary distributions across departments.

A key advantage of AI in data analysis is its ability to generate hypotheses dynamically. For instance, AI might hypothesize that engineers earn higher salaries than employees in other departments. It then tests this hypothesis against the dataset, identifies errors in logic or execution, and refines its approach accordingly. Example (source)

Furthermore, AI can analyze GitHub repositories, identifying the most popular JavaScript projects. The speaker notes that AI’s ability to detect correlations and relationships in datasets makes it an invaluable tool for business intelligence and decision-making.

Challenges in AI reasoning and confidence levels

One of the critical challenges AI faces is reasoning accuracy. AI models often generate responses based on probability, meaning that they may occasionally produce incorrect or misleading outputs. The speaker provides an example where AI is tasked with generating four incorrect answers and one correct answer to the question, “What is the capital of France?” Example (source)

During this process, the AI model assigns probability scores to each generated word, indicating confidence levels. The speaker highlights that when AI operates with low confidence, errors are more likely to occur. This underscores the importance of implementing mechanisms to verify AI-generated content and ensure reliability in high-stakes applications.

AI and code generation for data analysis

Given AI’s limitations in mathematical computations, Anand suggested a workaround: using AI to generate code that analyzes data rather than having AI perform the calculations directly. For example, instead of asking AI to calculate average salaries across different job roles, users can instruct AI to write Python or SQL queries that perform the computation.

By leveraging AI-generated code, businesses can integrate AI insights into their data pipelines while maintaining accuracy. Anand presented an example where AI analyzes employee data and generates hypotheses about salary trends. If the AI model produces an incorrect query, it can refine its approach iteratively until it reaches a valid result.

Evolution of AI models and cost efficiency

The final segment of the talk covered the rapid advancements in AI models and their cost efficiency. The speaker presents a graph (source) comparing different AI models based on quality and cost. Over time, AI models have improved in accuracy while becoming more affordable. Notable milestones include:

  • March 2023: AI models were relatively expensive, with significant variation in quality.
  • March 2024: More cost-effective models emerged, such as Claude 3 Haiku, which offered a balance of affordability and high performance.
  • Recent advancements: GPT-4o mini and DeepSeek V3 significantly improved performance-to-cost ratios, making AI more accessible for businesses and developers.

Anand noted that as AI models continue to evolve, the industry must adapt by leveraging the most efficient models available. They also highlight that while metrics such as cost and quality are crucial, businesses must carefully choose models that align with their specific needs.

Implications for the future of AI

The talk concluded with reflections on AI’s trajectory and its implications for various industries. The speaker acknowledges that while AI continues to improve, challenges such as hallucination, reasoning errors, and ethical concerns must be addressed. They emphasize that AI should be used as a tool to augment human intelligence rather than replace critical decision-making processes.

In summary, AI’s capabilities are expanding rapidly, impacting fields such as image generation, contract validation, structured content creation, and data analysis. Businesses and developers must stay informed about AI advancements to leverage these technologies effectively. As AI models become more sophisticated and cost-efficient, their integration into everyday workflows will become increasingly seamless, driving innovation across industries.

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hosted by

Jump starting better data engineering and AI futures

Supported by

Meet-up sponsor

Health navigation, simplified Cut through the noise and guide your members to better health and wellbeing with a proven, engaging navigation solution.

Community Partner

A community of interdisciplinary individuals with a shared interest in the practice of data visualisation across India