Skip to content

Conversation

@sarthakFuture
Copy link
Contributor

@sarthakFuture sarthakFuture commented Jun 13, 2025

Pull Request

Description

Describe the changes in this pull request:

  • What feature/bug does this PR address?
  • Provide any relevant links or screenshots.

Checklist

  • Code compiles correctly.
  • Created/updated tests.
  • Linting and formatting applied.
  • Documentation updated.

Related Issues

Closes #<issue_number>

Summary by CodeRabbit

  • New Features

    • Added 29 new evaluation types, including bias detection, content safety, code validation, summary quality, compliance, tone, function calling, scoring metrics, and more. Each evaluation type includes detailed criteria and input/output requirements, expanding the system's evaluation capabilities.
  • Documentation

    • Updated terminology in docstrings and documentation to consistently use "TraceAI" instead of "OpenInference" and clarified project descriptions.
    • Simplified example usage in LangChain integration documentation.
  • Chores

    • Updated and replaced dependencies to align with new package naming conventions.
    • Removed obsolete virtual environment configuration files.
    • Updated import paths and references in tests to reflect new package names and constants.
    • Renamed a test method to match updated tracer class naming.

@coderabbitai
Copy link

coderabbitai bot commented Jun 13, 2025

Caution

Review failed

Failed to post review comments.

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e30e671 and d6c5735.

📒 Files selected for processing (9)
  • python/fi_instrumentation/instrumentation/context_attributes.py (6 hunks)
  • python/frameworks/google-adk/.venv/pyvenv.cfg (0 hunks)
  • python/frameworks/google-adk/pyproject.toml (1 hunks)
  • python/frameworks/langchain/README.md (0 hunks)
  • python/frameworks/openai-agents/test-requirements.txt (1 hunks)
  • python/frameworks/openai-agents/tests/conftest.py (1 hunks)
  • python/frameworks/openai-agents/tests/test_span_attribute_helpers.py (1 hunks)
  • python/frameworks/smolagents/tests/openinference/instrumentation/smolagents/test_instrumentor.py (8 hunks)
  • typescript/packages/fi-core/src/fi_types.ts (3 hunks)
💤 Files with no reviewable changes (2)
  • python/frameworks/google-adk/.venv/pyvenv.cfg
  • python/frameworks/langchain/README.md
🧰 Additional context used
🧬 Code Graph Analysis (1)
python/frameworks/openai-agents/tests/conftest.py (2)
python/frameworks/openai-agents/traceai_openai_agents/__init__.py (1)
  • OpenAIAgentsInstrumentor (15-45)
python/frameworks/openai/traceai_openai/__init__.py (1)
  • OpenAIInstrumentor (28-75)
🪛 LanguageTool
python/frameworks/openai-agents/test-requirements.txt

[uncategorized] ~3-~3: Le trait d’union doit être supprimé.
Context: ...nai_agents==0.0.7 traceai-openai-agents opentelemetry-sdk respx pytest-vcr vcrpy>=6.0.1

(MOT_TRAIT_MOT)

🔇 Additional comments (4)
python/frameworks/google-adk/pyproject.toml (1)

4-4: Corrected package description
The description now accurately reflects that this package provides OpenTelemetry instrumentation for Google ADK. Please ensure that the README and any related documentation are updated to match this change.

python/fi_instrumentation/instrumentation/context_attributes.py (1)

86-96: Docstring rename looks consistent

All “OpenInference” mentions were replaced by “TraceAI”; no functional code touched.

🧰 Tools
🪛 Pylint (3.3.7)

[refactor] 86-86: Too few public methods (1/2)

(R0903)

python/frameworks/openai-agents/tests/test_span_attribute_helpers.py (1)

46-69: Import path migration LGTM

Imports now target traceai_openai_agents._processor; matches the production module path.
No further issues spotted.

typescript/packages/fi-core/src/fi_types.ts (1)

808-815: Potentially too restrictive type for reference-based scores

BLEU_SCORE, ROUGE_SCORE, and RECALL_SCORE map both reference and hypothesis to string.
Typical implementations accept either raw strings or token arrays / lists of references.

If downstream evaluators end up receiving arrays you will hit the validateFieldType guard (l. 851-858).

Consider loosening the contract:

-      reference: { type: "string", required: true },
-      hypothesis: { type: "string", required: true },
+      reference: { type: "array", required: true },    // allow list of refs
+      hypothesis: { type: "string", required: true },  // single system output

or accept a union via custom runtime check.

Also applies to: 820-823

Walkthrough

This update expands the EvalName enum in fi_types.ts by adding 29 new evaluation types related to bias, safety, code, summarization, and scoring. Corresponding configuration and input/output mapping functions are updated for each new eval. No existing logic is removed or altered; only new types and their configurations are added.

Changes

File(s) Change Summary
typescript/packages/fi-core/src/fi_types.ts Added 29 new members to EvalName enum; updated getConfigForEval and getMappingForEval to support new evals

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant EvalSystem
    participant EvalConfig
    participant EvalMapping

    User->>EvalSystem: Request evaluation with evalName
    EvalSystem->>EvalConfig: getConfigForEval(evalName)
    EvalConfig-->>EvalSystem: Return config for evalName
    EvalSystem->>EvalMapping: getMappingForEval(evalName)
    EvalMapping-->>EvalSystem: Return input/output mapping
    EvalSystem->>User: Perform evaluation using config and mapping
Loading

Possibly related PRs

  • future-agi/traceAI#33: Introduces the initial fi_types.ts module with the EvalName enum and related types; this PR directly extends and modifies those entities.

Poem

A rabbit hopped through fields of code,
Expanding evals with a heavy load.
Bias, safety, and scoring anew—
So many checks for models to do!
With enums and configs now set just right,
The system leaps forward, pure delight.
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sarthakFuture sarthakFuture changed the base branch from main to dev June 13, 2025 09:13
@NVJKKartik NVJKKartik merged commit 49d6cae into dev Jun 13, 2025
1 check passed
@coderabbitai coderabbitai bot mentioned this pull request Jun 13, 2025
Merged
4 tasks
@nik13 nik13 deleted the feature/new-evals-ts branch July 1, 2025 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants