Case Study

Intelligent Metric Search: Auditable AI Research for AlphaSense

Title

Roko Labs built an AI-assisted investor intelligence platform for an enterprise investment firm. Research runs faster, more consistently, and at lower cost, with accuracy and auditability intact. Outputs are structured and grounded in internal and external data.

a illustration of a Enterprise investor intelligence platform

Project Duration

<1 month

6 months

The Challenge

Investment research requires synthesizing large volumes of structured and unstructured data, including financial reports, market data, and internal knowledge. Existing workflows relied heavily on manual processes and fragmented tooling, which introduced several limitations:

• High time and cost requirements for research and validation
• Inconsistent outputs across analysts and teams
• Difficulty scaling workflows without increasing headcount
Fragmented access to data across systems
• Limited traceability from generated outputs back to source data

The firm needed a system that could improve efficiency and consistency while ensuring outputs remained grounded in verifiable data.

The Vision

Roko Labs designed a modular AI system centered on Intelligent Metric Search (IMS). Rather than using traditional Retrieval-Augmented Generation approaches that retrieve unstructured text for prompt injection, IMS focuses on retrieving metric identifiers and structured data relevant to a query.

The system uses keyword-based search as the primary retrieval method, with semantic search applied as a fallback when keyword matching does not return sufficient results. This ensures both precision and recall across different query types.

Retrieval and deterministic data processing operate as a unified step in the primary pipeline. Queries are used to identify relevant metric IDs, which are then resolved into structured data through deterministic transformations before being passed downstream.

Diagram illustrating a search workflow from user intent through keyword and semantic search to metric selection and final output.
Diagram illustrating a search workflow from user intent through keyword and semantic search to metric selection and final output.
Diagram illustrating a search workflow from user intent through keyword and semantic search to metric selection and final output.

Key Design Principle:
Use LLMs for Language, Not Logic

As described by the Head AI Architect on the project, Amel Spahić:

“The issue wasn’t the model. It was how much context we were giving it.”

This insight became the foundation of the new design principle: Use LLMs for natural language understanding, and deterministic systems for structured computation.

The Approach

Key elements of the approach included:

Intelligent Metric Search (IMS).
• Retrieves relevant metric identifiers using keyword search, with semantic fallback, and resolves them into structured data for downstream use

Unified retrieval and processing layer.
• Combines metric lookup and deterministic data transformation into a single step to ensure consistency and reduce pipeline complexity

Structured data grounding.
• Uses resolved metrics and attributes as primary inputs to generation, minimizing reliance on unstructured context

Data source integration.
• Connects internal datasets and external providers through a unified access layer

Controlled prompt construction.
• Formats structured data into consistent inputs for language models across workflows

Human review workflows.
• Allows analysts to review and refine outputs, supporting quality control

Cost-aware system design.
• Reduces token usage and compute cost by limiting unnecessary context and focusing on relevant structured inputs

Before‑and‑after comparison showing an AI system overloaded by large, unstructured prompts versus a redesigned approach using small, structured prompts supported by retrieval and deterministic systems for consistent investor intelligence.
Before‑and‑after comparison showing an AI system overloaded by large, unstructured prompts versus a redesigned approach using small, structured prompts supported by retrieval and deterministic systems for consistent investor intelligence.

The Impact

The system delivered measurable operational improvements:

• Reduced time required to produce research outputs
• Efficient retrieval and prompt design lowered the compute and infrastructure costs
• Improved consistency of outputs across workflows
• Increased visibility into the data used to generate responses
• Scaled research workflows without proportional increases in manual effort

The Solution

IMS runs the full pipeline from query to generated answer. Research, analysis, and content generation all sit on the same retrieval layer.

When a query comes in, the system runs keyword retrieval first to identify the relevant metric IDs. Semantic search runs only when keyword retrieval misses. In the same pipeline step, deterministic processing resolves those metrics into structured data.

A language model then generates the response from those structured inputs. The output is grounded in the retrieved metrics, not in unstructured text.

Every response is inspectable. Because the inputs are structured and tied to specific metrics, users can see the exact data behind any answer. Most RAG systems retrieve unstructured text and cannot offer that level of traceability.

Standardizing query handling and output generation cuts variability across users and teams.


Conclusion



By focusing on structured data retrieval and deterministic processing, Roko Labs helped demonstrate that the client could improve the efficiency and reliability of its investment research workflows.

Intelligent Metric Search (IMS) provides a practical alternative to traditional retrieval-based approaches in domains where precision, traceability, and cost control are critical.

aria-label="Home"

Copyright © 2026 Roko Labs Inc.

All rights reserved.

1250 Broadway, 36th Floor, New York, NY, 10001

aria-label="Home"

Copyright © 2026 Roko Labs Inc.

All rights reserved.

1250 Broadway, 36th Floor, New York, NY, 10001

aria-label="Home"

Copyright © 2026 Roko Labs Inc.

All rights reserved.

1250 Broadway, 36th Floor, New York, NY, 10001

aria-label="Home"

Copyright © 2026 Roko Labs Inc.

All rights reserved.

1250 Broadway, 36th Floor, New York, NY, 10001