ragaai-catalyst 2.1.7.1__tar.gz → 2.1.7.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ragaai_catalyst-2.1.7.1/ragaai_catalyst.egg-info → ragaai_catalyst-2.1.7.2}/PKG-INFO +4 -166
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/README.md +3 -165
- ragaai_catalyst-2.1.7.2/docs/agentic_tracing.md +265 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/pyproject.toml +1 -1
- ragaai_catalyst-2.1.7.2/quickstart.md +195 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/synthetic_data_generation.py +4 -2
- ragaai_catalyst-2.1.7.2/ragaai_catalyst/tracers/utils/rag_trace_json_converter.py +394 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2/ragaai_catalyst.egg-info}/PKG-INFO +4 -166
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst.egg-info/SOURCES.txt +2 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/langchain/medical_rag/diagnosis_agent.py +2 -2
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/langgraph/personal_research_assistant/research_assistant.py +36 -16
- ragaai_catalyst-2.1.7.1/ragaai_catalyst/tracers/utils/rag_trace_json_converter.py +0 -245
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/.github/workflows/ci.yml +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/.gitignore +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/.gitmodules +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/LICENSE +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/docs/dataset_management.md +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/docs/img/autheticate.gif +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/docs/img/create_project.gif +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/docs/img/custom_metrics.png +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/docs/img/dataset.gif +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/docs/img/dataset.png +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/docs/img/evaluation.gif +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/docs/img/evaluation.png +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/docs/img/guardrails.png +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/docs/img/last_main.png +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/docs/img/main.png +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/docs/img/projects_new.png +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/docs/img/trace_comp.png +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/docs/prompt_management.md +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/docs/trace_management.md +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/all_llm_provider/all_llm_provider.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/all_llm_provider/config.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/all_llm_provider/run_all_llm_provider.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/crewai/scifi_writer/README.md +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/crewai/scifi_writer/requirements.txt +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/crewai/scifi_writer/sample.env +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/crewai/scifi_writer/scifi_writer.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/custom_agents/travel_agent/agents.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/custom_agents/travel_agent/config.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/custom_agents/travel_agent/main.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/custom_agents/travel_agent/tools.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/haystack/news_fetching/README.md +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/haystack/news_fetching/news_fetching.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/haystack/news_fetching/requirements.txt +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/langchain/medical_rag/data/medical_texts/handbook1.pdf +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/langchain/medical_rag/data/medical_texts/handbook2.pdf +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/langchain/medical_rag/data/symptom_disease_map.csv +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/langchain/medical_rag/diagnosis_agent.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/langchain/medical_rag/requirements.txt +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/langchain/medical_rag/sample.env +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/langgraph/personal_research_assistant/README.md +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/langgraph/personal_research_assistant/requirements.txt +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/langgraph/personal_research_assistant/research_assistant.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/langgraph/personal_research_assistant/sample.env +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/llamaindex_examples/legal_research_rag/legal_data/cases/ca_overtime_2021.pdf +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/llamaindex_examples/legal_research_rag/legal_data/cases/fl_ada_2022.pdf +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/llamaindex_examples/legal_research_rag/legal_data/statutes.csv +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/llamaindex_examples/legal_research_rag/legal_rag.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/llamaindex_examples/legal_research_rag/requirements.txt +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/llamaindex_examples/legal_research_rag/sample.env +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/openai_agents_sdk/email_data_extraction_agent/README.md +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/openai_agents_sdk/email_data_extraction_agent/data_extraction_email.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/openai_agents_sdk/email_data_extraction_agent/requirements.txt +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/openai_agents_sdk/email_data_extraction_agent/sample.env +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/openai_agents_sdk/youtube_summary_agent/README.md +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/openai_agents_sdk/youtube_summary_agent/requirements.txt +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/openai_agents_sdk/youtube_summary_agent/sample.env +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/openai_agents_sdk/youtube_summary_agent/youtube_summary_agent.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/pii_masking_example/llamaindex_agentic_fastapi/app.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/pii_masking_example/llamaindex_agentic_fastapi/app_presidio.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/pii_masking_example/llamaindex_agentic_fastapi/request.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/pii_masking_example/llamaindex_agentic_fastapi/requirements.txt +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/smolagents/most_upvoted_paper/README.md +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/smolagents/most_upvoted_paper/most_upvoted_paper.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/smolagents/most_upvoted_paper/requirements.txt +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/examples/smolagents/most_upvoted_paper/sample.env +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/__init__.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/_version.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/dataset.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/evaluation.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/experiment.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/guard_executor.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/guardrails_manager.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/internal_api_completion.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/prompt_manager.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/proxy_call.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/ragaai_catalyst.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/redteaming/__init__.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/redteaming/config/detectors.toml +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/redteaming/data_generator/scenario_generator.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/redteaming/data_generator/test_case_generator.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/redteaming/evaluator.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/redteaming/llm_generator.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/redteaming/llm_generator_old.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/redteaming/red_teaming.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/redteaming/requirements.txt +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/redteaming/tests/grok.ipynb +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/redteaming/tests/stereotype.ipynb +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/redteaming/upload_result.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/redteaming/utils/issue_description.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/redteaming/utils/rt.png +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/redteaming_old.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/__init__.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/README.md +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/__init__.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/data/__init__.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/data/data_structure.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/tests/FinancialAnalysisSystem.ipynb +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/tests/GameActivityEventPlanner.ipynb +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/tests/TravelPlanner.ipynb +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/tests/__init__.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/tests/ai_travel_agent.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/tests/unique_decorator_test.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/tracers/__init__.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/tracers/agent_tracer.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/tracers/base.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/tracers/custom_tracer.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/tracers/langgraph_tracer.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/tracers/llm_tracer.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/tracers/main_tracer.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/tracers/network_tracer.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/tracers/tool_tracer.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/tracers/user_interaction_tracer.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/upload/__init__.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/upload/trace_uploader.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/upload/upload_agentic_traces.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/upload/upload_code.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/upload/upload_local_metric.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/upload/upload_trace_metric.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/utils/__init__.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/utils/api_utils.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/utils/create_dataset_schema.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/utils/file_name_tracker.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/utils/generic.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/utils/get_user_trace_metrics.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/utils/llm_utils.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/utils/model_costs.json +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/utils/span_attributes.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/utils/supported_llm_provider.toml +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/utils/system_monitor.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/utils/trace_utils.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/utils/unique_decorator.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/agentic_tracing/utils/zip_list_of_unique_files.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/distributed.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/exporters/__init__.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/exporters/dynamic_trace_exporter.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/exporters/file_span_exporter.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/exporters/raga_exporter.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/exporters/ragaai_trace_exporter.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/instrumentators/__init__.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/langchain_callback.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/llamaindex_callback.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/llamaindex_instrumentation.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/tracer.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/upload_traces.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/utils/__init__.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/utils/convert_langchain_callbacks_output.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/utils/convert_llama_instru_callback.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/utils/extraction_logic_llama_index.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/utils/langchain_tracer_extraction_logic.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/utils/model_prices_and_context_window_backup.json +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/utils/trace_json_converter.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/tracers/utils/utils.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst/utils.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst.egg-info/dependency_links.txt +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst.egg-info/requires.txt +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/ragaai_catalyst.egg-info/top_level.txt +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/requirements.txt +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/setup.cfg +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/test_report_20250407_183101.txt +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/README.md +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/environment.yml +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/__init__.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/all_llm_provider/all_llm_provider.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/all_llm_provider/config.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/all_llm_provider/test_all_llm_provider.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/crewai/scifi_writer/sci_fi_story.md +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/crewai/scifi_writer/scifi_writer.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/crewai/scifi_writer/test_scifi_writer.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/custom_agents/travel_agent/agents.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/custom_agents/travel_agent/config.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/custom_agents/travel_agent/main.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/custom_agents/travel_agent/test_travel_agent.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/custom_agents/travel_agent/tools.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/haystack/news_fetching/news_fetching.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/haystack/news_fetching/test_news_fetching.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/langchain/medical_rag/data/medical_texts/handbook1.pdf +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/langchain/medical_rag/data/medical_texts/handbook2.pdf +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/langchain/medical_rag/data/symptom_disease_map.csv +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/langchain/medical_rag/test_diagnosis_agent.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/langgraph/personal_research_assistant/test_research_assistant.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/llamaindex_examples/legal_research_rag/legal_data/cases/ca_overtime_2021.pdf +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/llamaindex_examples/legal_research_rag/legal_data/cases/fl_ada_2022.pdf +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/llamaindex_examples/legal_research_rag/legal_data/statutes.csv +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/llamaindex_examples/legal_research_rag/legal_rag.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/llamaindex_examples/legal_research_rag/test_legal_rag.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/smolagents/most_upvoted_paper/most_upvoted_paper.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/smolagents/most_upvoted_paper/paper.pdf +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/smolagents/most_upvoted_paper/test_most_upvoted_paper.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/test_utils/get_components.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/examples/test_utils/get_trace_data.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/run_pytest_and_print_and_save_results.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/table_result.png +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/test_catalyst/test_base_tracer_add_metrics.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/test_catalyst/test_base_tracer_metrics.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/test_catalyst/test_data/util_synthetic_data_doc.pdf +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/test_catalyst/test_data/util_synthetic_data_invalid.csv +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/test_catalyst/test_data/util_synthetic_data_valid.csv +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/test_catalyst/test_data/util_test_dataset.csv +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/test_catalyst/test_data/util_test_langchain_tracing.pdf +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/test_catalyst/test_dataset.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/test_catalyst/test_evaluation.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/test_catalyst/test_evaluation_metrics.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/test_catalyst/test_prompt_manager.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/test_catalyst/test_synthetic_data_generation.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests/test_catalyst/test_the_configuration.py +0 -0
- {ragaai_catalyst-2.1.7.1 → ragaai_catalyst-2.1.7.2}/tests_requirements.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ragaai_catalyst
|
3
|
-
Version: 2.1.7.
|
3
|
+
Version: 2.1.7.2
|
4
4
|
Summary: RAGA AI CATALYST
|
5
5
|
Author-email: Kiran Scaria <kiran.scaria@raga.ai>, Kedar Gaikwad <kedar.gaikwad@raga.ai>, Dushyant Mahajan <dushyant.mahajan@raga.ai>, Siddhartha Kosti <siddhartha.kosti@raga.ai>, Ritika Goel <ritika.goel@raga.ai>, Vijay Chaurasia <vijay.chaurasia@raga.ai>, Tushar Kumar <tushar.kumar@raga.ai>
|
6
6
|
Requires-Python: <=3.13.2,>=3.10
|
@@ -57,8 +57,6 @@ Dynamic: license-file
|
|
57
57
|
|
58
58
|
RagaAI Catalyst is a comprehensive platform designed to enhance the management and optimization of LLM projects. It offers a wide range of features, including project management, dataset management, evaluation management, trace management, prompt management, synthetic data generation, and guardrail management. These functionalities enable you to efficiently evaluate, and safeguard your LLM applications.
|
59
59
|
|
60
|
-

|
61
|
-
|
62
60
|
## Table of Contents
|
63
61
|
|
64
62
|
- [RagaAI Catalyst](#ragaai-catalyst)
|
@@ -149,20 +147,6 @@ dataset_manager.create_from_csv(
|
|
149
147
|
schema_mapping={'column1': 'schema_element1', 'column2': 'schema_element2'}
|
150
148
|
)
|
151
149
|
|
152
|
-
# Create a dataset from JSONl
|
153
|
-
dataset_manager.create_from_jsonl(
|
154
|
-
jsonl_path='jsonl_path',
|
155
|
-
dataset_name='MyDataset',
|
156
|
-
schema_mapping={'column1': 'schema_element1', 'column2': 'schema_element2'}
|
157
|
-
)
|
158
|
-
|
159
|
-
# Create a dataset from dataframe
|
160
|
-
dataset_manager.create_from_df(
|
161
|
-
df=df,
|
162
|
-
dataset_name='MyDataset',
|
163
|
-
schema_mapping={'column1': 'schema_element1', 'column2': 'schema_element2'}
|
164
|
-
)
|
165
|
-
|
166
150
|
# Get project schema mapping
|
167
151
|
dataset_manager.get_schema_mapping()
|
168
152
|
|
@@ -189,7 +173,6 @@ evaluation = Evaluation(
|
|
189
173
|
evaluation.list_metrics()
|
190
174
|
|
191
175
|
# Add metrics to the experiment
|
192
|
-
|
193
176
|
schema_mapping={
|
194
177
|
'Query': 'prompt',
|
195
178
|
'response': 'response',
|
@@ -303,159 +286,14 @@ tracer = Tracer(
|
|
303
286
|
```
|
304
287
|
|
305
288
|
```python
|
289
|
+
# Enable auto-instrumentation
|
306
290
|
from ragaai_catalyst import init_tracing
|
307
291
|
init_tracing(catalyst=catalyst, tracer=tracer)
|
308
292
|
```
|
309
293
|
|
310
|
-
#### Agentic Tracing Features
|
311
|
-
1- add span level metrics
|
312
|
-
|
313
|
-
```python
|
314
|
-
current_span().add_metrics(name='Accuracy', score=0.5, reasoning='some reasoning')
|
315
|
-
```
|
316
|
-
|
317
|
-
2- add trace level metrics
|
318
|
-
|
319
|
-
```python
|
320
|
-
tracer.add_metrics(name='hallucination_1', score=0.5, reasoning='some reasoning')
|
321
|
-
```
|
322
|
-
|
323
|
-
3- add gt
|
324
|
-
|
325
|
-
```python
|
326
|
-
current_span().add_gt("This is the ground truth")
|
327
|
-
```
|
328
|
-
|
329
|
-
4- add context
|
330
|
-
|
331
|
-
```python
|
332
|
-
current_span().add_context("This is the context")
|
333
|
-
```
|
334
|
-
|
335
|
-
5- add span level metric execution
|
336
|
-
|
337
|
-
```python
|
338
|
-
current_span().execute_metrics(
|
339
|
-
name="Hallucination",
|
340
|
-
model="gpt-4o",
|
341
|
-
provider="openai"
|
342
|
-
)
|
343
|
-
```
|
344
|
-
|
345
|
-
#### Example
|
346
|
-
```python
|
347
|
-
from ragaai_catalyst import trace_llm, trace_tool, trace_agent, current_span
|
348
|
-
|
349
|
-
from openai import OpenAI
|
350
|
-
|
351
|
-
|
352
|
-
@trace_llm(name="llm_call", tags=["default_llm_call"])
|
353
|
-
def llm_call(prompt, max_tokens=512, model="gpt-4o-mini"):
|
354
|
-
client = OpenAI(api_key=OPENAI_API_KEY)
|
355
|
-
response = client.chat.completions.create(
|
356
|
-
model=model,
|
357
|
-
messages=[{"role": "user", "content": prompt}],
|
358
|
-
max_tokens=max_tokens,
|
359
|
-
temperature=0.85,
|
360
|
-
)
|
361
|
-
# Span level context
|
362
|
-
current_span().add_context("name = span level in summary_agent, context = some span level context")
|
363
|
-
|
364
|
-
# Span level execute metrics
|
365
|
-
current_span().execute_metrics(
|
366
|
-
name="Hallucination",
|
367
|
-
model="gpt-4o",
|
368
|
-
provider="openai"
|
369
|
-
)
|
370
|
-
response_data = response.choices[0].message.content.strip()
|
371
|
-
print('response_data: ', response_data)
|
372
|
-
return response_data
|
373
|
-
|
374
|
-
class SummaryAgent:
|
375
|
-
def __init__(self, persona="Summary Agent"):
|
376
|
-
self.persona = persona
|
377
|
-
|
378
|
-
@trace_agent(name="summary_agent")
|
379
|
-
def summarize(self, text):
|
380
|
-
prompt = f"Please summarize this text concisely: {text}"
|
381
|
-
|
382
|
-
# Span level metric
|
383
|
-
current_span().add_metrics(name='Accuracy', score=0.5, reasoning='some reasoning')
|
384
|
-
|
385
|
-
# Span level context
|
386
|
-
current_span().add_context("name = span level in summary_agent, context = some span level context")
|
387
|
-
|
388
|
-
summary = llm_call(prompt)
|
389
|
-
return summary
|
390
|
-
|
391
|
-
|
392
|
-
class AnalysisAgent:
|
393
|
-
def __init__(self, persona="Analysis Agent"):
|
394
|
-
self.persona = persona
|
395
|
-
self.summary_agent = SummaryAgent()
|
396
|
-
|
397
|
-
@trace_agent(name="analysis_agent")
|
398
|
-
def analyze(self, text):
|
399
|
-
summary = self.summary_agent.summarize(text)
|
400
|
-
|
401
|
-
prompt = f"Given this summary: {summary}\nProvide a brief analysis of the main points."
|
402
|
-
|
403
|
-
# Span level metric
|
404
|
-
current_span().add_metrics(name='correctness', score=0.5, reasoning='some reasoning')
|
405
|
-
analysis = llm_call(prompt)
|
406
|
-
|
407
|
-
return {
|
408
|
-
"summary": summary,
|
409
|
-
"analysis": analysis
|
410
|
-
}
|
411
|
-
|
412
|
-
class RecommendationAgent:
|
413
|
-
def __init__(self, persona="Recommendation Agent"):
|
414
|
-
self.persona = persona
|
415
|
-
self.analysis_agent = AnalysisAgent()
|
416
|
-
|
417
|
-
@trace_agent(name="recommendation_agent", tags=['coordinator_agent'])
|
418
|
-
def recommend(self, text):
|
419
|
-
analysis_result = self.analysis_agent.analyze(text)
|
420
|
-
|
421
|
-
prompt = f"""Given this summary: {analysis_result['summary']}
|
422
|
-
And this analysis: {analysis_result['analysis']}
|
423
|
-
Provide 2-3 actionable recommendations."""
|
424
|
-
|
425
|
-
recommendations = llm_call(prompt)
|
426
|
-
|
427
|
-
return {
|
428
|
-
"summary": analysis_result["summary"],
|
429
|
-
"analysis": analysis_result["analysis"],
|
430
|
-
"recommendations": recommendations
|
431
|
-
}
|
432
|
-
#Defining agent tracer
|
433
|
-
@trace_agent(name="get_recommendation", tags=['coordinator_agent'])
|
434
|
-
def get_recommendation(agent, text):
|
435
|
-
recommendation = agent.recommend(text)
|
436
|
-
return recommendation
|
437
|
-
|
438
|
-
def main():
|
439
|
-
text = """
|
440
|
-
Artificial Intelligence has transformed various industries in recent years.
|
441
|
-
From healthcare to finance, AI applications are becoming increasingly prevalent.
|
442
|
-
Machine learning models are being used to predict market trends, diagnose diseases,
|
443
|
-
and automate routine tasks. The impact of AI on society continues to grow,
|
444
|
-
raising both opportunities and challenges for the future.
|
445
|
-
"""
|
446
|
-
|
447
|
-
recommendation_agent = RecommendationAgent()
|
448
|
-
result = get_recommendation(recommendation_agent, text)
|
449
|
-
|
450
|
-
|
451
|
-
# Trace level metric
|
452
|
-
tracer.add_metrics(name='hallucination_1', score=0.5, reasoning='some reasoning')
|
453
|
-
|
454
|
-
# Run tracer
|
455
|
-
with tracer:
|
456
|
-
main()
|
457
|
-
```
|
458
294
|

|
295
|
+
For more detailed information on Trace Management, please refer to the [Agentic Tracing Management documentation](docs/agentic_tracing.md).
|
296
|
+
|
459
297
|
|
460
298
|
### Prompt Management
|
461
299
|
|
@@ -2,8 +2,6 @@
|
|
2
2
|
|
3
3
|
RagaAI Catalyst is a comprehensive platform designed to enhance the management and optimization of LLM projects. It offers a wide range of features, including project management, dataset management, evaluation management, trace management, prompt management, synthetic data generation, and guardrail management. These functionalities enable you to efficiently evaluate, and safeguard your LLM applications.
|
4
4
|
|
5
|
-

|
6
|
-
|
7
5
|
## Table of Contents
|
8
6
|
|
9
7
|
- [RagaAI Catalyst](#ragaai-catalyst)
|
@@ -94,20 +92,6 @@ dataset_manager.create_from_csv(
|
|
94
92
|
schema_mapping={'column1': 'schema_element1', 'column2': 'schema_element2'}
|
95
93
|
)
|
96
94
|
|
97
|
-
# Create a dataset from JSONl
|
98
|
-
dataset_manager.create_from_jsonl(
|
99
|
-
jsonl_path='jsonl_path',
|
100
|
-
dataset_name='MyDataset',
|
101
|
-
schema_mapping={'column1': 'schema_element1', 'column2': 'schema_element2'}
|
102
|
-
)
|
103
|
-
|
104
|
-
# Create a dataset from dataframe
|
105
|
-
dataset_manager.create_from_df(
|
106
|
-
df=df,
|
107
|
-
dataset_name='MyDataset',
|
108
|
-
schema_mapping={'column1': 'schema_element1', 'column2': 'schema_element2'}
|
109
|
-
)
|
110
|
-
|
111
95
|
# Get project schema mapping
|
112
96
|
dataset_manager.get_schema_mapping()
|
113
97
|
|
@@ -134,7 +118,6 @@ evaluation = Evaluation(
|
|
134
118
|
evaluation.list_metrics()
|
135
119
|
|
136
120
|
# Add metrics to the experiment
|
137
|
-
|
138
121
|
schema_mapping={
|
139
122
|
'Query': 'prompt',
|
140
123
|
'response': 'response',
|
@@ -248,159 +231,14 @@ tracer = Tracer(
|
|
248
231
|
```
|
249
232
|
|
250
233
|
```python
|
234
|
+
# Enable auto-instrumentation
|
251
235
|
from ragaai_catalyst import init_tracing
|
252
236
|
init_tracing(catalyst=catalyst, tracer=tracer)
|
253
237
|
```
|
254
238
|
|
255
|
-
#### Agentic Tracing Features
|
256
|
-
1- add span level metrics
|
257
|
-
|
258
|
-
```python
|
259
|
-
current_span().add_metrics(name='Accuracy', score=0.5, reasoning='some reasoning')
|
260
|
-
```
|
261
|
-
|
262
|
-
2- add trace level metrics
|
263
|
-
|
264
|
-
```python
|
265
|
-
tracer.add_metrics(name='hallucination_1', score=0.5, reasoning='some reasoning')
|
266
|
-
```
|
267
|
-
|
268
|
-
3- add gt
|
269
|
-
|
270
|
-
```python
|
271
|
-
current_span().add_gt("This is the ground truth")
|
272
|
-
```
|
273
|
-
|
274
|
-
4- add context
|
275
|
-
|
276
|
-
```python
|
277
|
-
current_span().add_context("This is the context")
|
278
|
-
```
|
279
|
-
|
280
|
-
5- add span level metric execution
|
281
|
-
|
282
|
-
```python
|
283
|
-
current_span().execute_metrics(
|
284
|
-
name="Hallucination",
|
285
|
-
model="gpt-4o",
|
286
|
-
provider="openai"
|
287
|
-
)
|
288
|
-
```
|
289
|
-
|
290
|
-
#### Example
|
291
|
-
```python
|
292
|
-
from ragaai_catalyst import trace_llm, trace_tool, trace_agent, current_span
|
293
|
-
|
294
|
-
from openai import OpenAI
|
295
|
-
|
296
|
-
|
297
|
-
@trace_llm(name="llm_call", tags=["default_llm_call"])
|
298
|
-
def llm_call(prompt, max_tokens=512, model="gpt-4o-mini"):
|
299
|
-
client = OpenAI(api_key=OPENAI_API_KEY)
|
300
|
-
response = client.chat.completions.create(
|
301
|
-
model=model,
|
302
|
-
messages=[{"role": "user", "content": prompt}],
|
303
|
-
max_tokens=max_tokens,
|
304
|
-
temperature=0.85,
|
305
|
-
)
|
306
|
-
# Span level context
|
307
|
-
current_span().add_context("name = span level in summary_agent, context = some span level context")
|
308
|
-
|
309
|
-
# Span level execute metrics
|
310
|
-
current_span().execute_metrics(
|
311
|
-
name="Hallucination",
|
312
|
-
model="gpt-4o",
|
313
|
-
provider="openai"
|
314
|
-
)
|
315
|
-
response_data = response.choices[0].message.content.strip()
|
316
|
-
print('response_data: ', response_data)
|
317
|
-
return response_data
|
318
|
-
|
319
|
-
class SummaryAgent:
|
320
|
-
def __init__(self, persona="Summary Agent"):
|
321
|
-
self.persona = persona
|
322
|
-
|
323
|
-
@trace_agent(name="summary_agent")
|
324
|
-
def summarize(self, text):
|
325
|
-
prompt = f"Please summarize this text concisely: {text}"
|
326
|
-
|
327
|
-
# Span level metric
|
328
|
-
current_span().add_metrics(name='Accuracy', score=0.5, reasoning='some reasoning')
|
329
|
-
|
330
|
-
# Span level context
|
331
|
-
current_span().add_context("name = span level in summary_agent, context = some span level context")
|
332
|
-
|
333
|
-
summary = llm_call(prompt)
|
334
|
-
return summary
|
335
|
-
|
336
|
-
|
337
|
-
class AnalysisAgent:
|
338
|
-
def __init__(self, persona="Analysis Agent"):
|
339
|
-
self.persona = persona
|
340
|
-
self.summary_agent = SummaryAgent()
|
341
|
-
|
342
|
-
@trace_agent(name="analysis_agent")
|
343
|
-
def analyze(self, text):
|
344
|
-
summary = self.summary_agent.summarize(text)
|
345
|
-
|
346
|
-
prompt = f"Given this summary: {summary}\nProvide a brief analysis of the main points."
|
347
|
-
|
348
|
-
# Span level metric
|
349
|
-
current_span().add_metrics(name='correctness', score=0.5, reasoning='some reasoning')
|
350
|
-
analysis = llm_call(prompt)
|
351
|
-
|
352
|
-
return {
|
353
|
-
"summary": summary,
|
354
|
-
"analysis": analysis
|
355
|
-
}
|
356
|
-
|
357
|
-
class RecommendationAgent:
|
358
|
-
def __init__(self, persona="Recommendation Agent"):
|
359
|
-
self.persona = persona
|
360
|
-
self.analysis_agent = AnalysisAgent()
|
361
|
-
|
362
|
-
@trace_agent(name="recommendation_agent", tags=['coordinator_agent'])
|
363
|
-
def recommend(self, text):
|
364
|
-
analysis_result = self.analysis_agent.analyze(text)
|
365
|
-
|
366
|
-
prompt = f"""Given this summary: {analysis_result['summary']}
|
367
|
-
And this analysis: {analysis_result['analysis']}
|
368
|
-
Provide 2-3 actionable recommendations."""
|
369
|
-
|
370
|
-
recommendations = llm_call(prompt)
|
371
|
-
|
372
|
-
return {
|
373
|
-
"summary": analysis_result["summary"],
|
374
|
-
"analysis": analysis_result["analysis"],
|
375
|
-
"recommendations": recommendations
|
376
|
-
}
|
377
|
-
#Defining agent tracer
|
378
|
-
@trace_agent(name="get_recommendation", tags=['coordinator_agent'])
|
379
|
-
def get_recommendation(agent, text):
|
380
|
-
recommendation = agent.recommend(text)
|
381
|
-
return recommendation
|
382
|
-
|
383
|
-
def main():
|
384
|
-
text = """
|
385
|
-
Artificial Intelligence has transformed various industries in recent years.
|
386
|
-
From healthcare to finance, AI applications are becoming increasingly prevalent.
|
387
|
-
Machine learning models are being used to predict market trends, diagnose diseases,
|
388
|
-
and automate routine tasks. The impact of AI on society continues to grow,
|
389
|
-
raising both opportunities and challenges for the future.
|
390
|
-
"""
|
391
|
-
|
392
|
-
recommendation_agent = RecommendationAgent()
|
393
|
-
result = get_recommendation(recommendation_agent, text)
|
394
|
-
|
395
|
-
|
396
|
-
# Trace level metric
|
397
|
-
tracer.add_metrics(name='hallucination_1', score=0.5, reasoning='some reasoning')
|
398
|
-
|
399
|
-
# Run tracer
|
400
|
-
with tracer:
|
401
|
-
main()
|
402
|
-
```
|
403
239
|

|
240
|
+
For more detailed information on Trace Management, please refer to the [Agentic Tracing Management documentation](docs/agentic_tracing.md).
|
241
|
+
|
404
242
|
|
405
243
|
### Prompt Management
|
406
244
|
|
@@ -0,0 +1,265 @@
|
|
1
|
+
## Agentic Tracing
|
2
|
+
The module includes utilities for cost tracking, performance monitoring, and debugging agent behavior. This helps in understanding and optimizing AI agent performance while maintaining transparency in agent operations.
|
3
|
+
|
4
|
+
#### Supported Tracer Types
|
5
|
+
Choose from the given supported tracer types based on your framework:
|
6
|
+
|
7
|
+
1. agentic/langgraph
|
8
|
+
2. agentic/langchain
|
9
|
+
3. agentic/smolagents
|
10
|
+
4. agentic/openai_agents
|
11
|
+
5. agentic/llamaindex
|
12
|
+
6. agentic/haystack
|
13
|
+
|
14
|
+
#### Agentic Tracing Features
|
15
|
+
1- add span level metrics
|
16
|
+
|
17
|
+
```python
|
18
|
+
current_span().add_metrics(name='Accuracy', score=0.5, reasoning='some reasoning')
|
19
|
+
```
|
20
|
+
|
21
|
+
2- add trace level metrics
|
22
|
+
|
23
|
+
```python
|
24
|
+
tracer.add_metrics(name='hallucination_1', score=0.5, reasoning='some reasoning')
|
25
|
+
```
|
26
|
+
|
27
|
+
3- add gt
|
28
|
+
|
29
|
+
```python
|
30
|
+
current_span().add_gt("This is the ground truth")
|
31
|
+
```
|
32
|
+
|
33
|
+
4- add context
|
34
|
+
|
35
|
+
```python
|
36
|
+
current_span().add_context("This is the context")
|
37
|
+
```
|
38
|
+
|
39
|
+
5- add span level metric execution
|
40
|
+
|
41
|
+
```python
|
42
|
+
current_span().execute_metrics(
|
43
|
+
name="Hallucination",
|
44
|
+
model="gpt-4o",
|
45
|
+
provider="openai"
|
46
|
+
)
|
47
|
+
```
|
48
|
+
|
49
|
+
#### Agentic Tracing example (langgraph)
|
50
|
+
|
51
|
+
```python
|
52
|
+
import os
|
53
|
+
import time
|
54
|
+
from langgraph.graph import StateGraph, END
|
55
|
+
from langchain_core.prompts import PromptTemplate
|
56
|
+
from langchain_openai import ChatOpenAI
|
57
|
+
from langchain_community.tools.tavily_search import TavilySearchResults
|
58
|
+
from typing import TypedDict, Annotated, List, Dict, Any, Optional
|
59
|
+
import operator
|
60
|
+
|
61
|
+
from dotenv import load_dotenv
|
62
|
+
|
63
|
+
# Load environment variables from .env file
|
64
|
+
load_dotenv()
|
65
|
+
|
66
|
+
# Import RagaAI Catalyst for tracing
|
67
|
+
from ragaai_catalyst import RagaAICatalyst, init_tracing
|
68
|
+
from ragaai_catalyst.tracers import Tracer
|
69
|
+
|
70
|
+
# Initialize RagaAI Catalyst
|
71
|
+
def initialize_catalyst():
|
72
|
+
"""Initialize RagaAI Catalyst using environment credentials."""
|
73
|
+
catalyst = RagaAICatalyst(
|
74
|
+
access_key=os.getenv('CATALYST_ACCESS_KEY'),
|
75
|
+
secret_key=os.getenv('CATALYST_SECRET_KEY'),
|
76
|
+
base_url=os.getenv('CATALYST_BASE_URL')
|
77
|
+
)
|
78
|
+
|
79
|
+
tracer = Tracer(
|
80
|
+
project_name=os.environ['PROJECT_NAME'],
|
81
|
+
dataset_name=os.environ['DATASET_NAME'],
|
82
|
+
tracer_type="agentic/langgraph",
|
83
|
+
)
|
84
|
+
|
85
|
+
init_tracing(catalyst=catalyst, tracer=tracer)
|
86
|
+
|
87
|
+
|
88
|
+
# Initialize language models and tools
|
89
|
+
def initialize_models(model_name: str = "gpt-4o-mini", temperature: float = 0.5, max_results: int = 2):
|
90
|
+
"""Initialize the language model and search tool."""
|
91
|
+
llm = ChatOpenAI(model=model_name, temperature=temperature)
|
92
|
+
tavily_tool = TavilySearchResults(max_results=max_results)
|
93
|
+
return llm, tavily_tool
|
94
|
+
|
95
|
+
# Initialize default instances
|
96
|
+
initialize_catalyst()
|
97
|
+
llm, tavily_tool = initialize_models()
|
98
|
+
|
99
|
+
# State structure
|
100
|
+
class ResearchState(TypedDict):
|
101
|
+
topic: str
|
102
|
+
sub_questions: List[str]
|
103
|
+
answers: List[dict]
|
104
|
+
synthesis: str
|
105
|
+
criticism: str
|
106
|
+
iteration: Annotated[int, operator.add]
|
107
|
+
status: str
|
108
|
+
|
109
|
+
# Nodes
|
110
|
+
def generate_sub_questions(state: ResearchState) -> ResearchState:
|
111
|
+
"""Generate sub-questions based on the topic."""
|
112
|
+
prompt = PromptTemplate(
|
113
|
+
input_variables=["topic"],
|
114
|
+
template="Given the topic '{topic}', generate 3 specific sub-questions to guide research."
|
115
|
+
)
|
116
|
+
response = llm.invoke(prompt.format(topic=state["topic"]))
|
117
|
+
questions = [q.strip() for q in response.content.split("\n") if q.strip()]
|
118
|
+
return {"sub_questions": questions, "status": "generated_questions"}
|
119
|
+
|
120
|
+
def research_sub_questions(state: ResearchState) -> ResearchState:
|
121
|
+
"""Research each sub-question using Tavily."""
|
122
|
+
answers = []
|
123
|
+
for question in state["sub_questions"]:
|
124
|
+
search_results = tavily_tool.invoke(question)
|
125
|
+
prompt = PromptTemplate(
|
126
|
+
input_variables=["question", "search_results"],
|
127
|
+
template="Answer '{question}' concisely based on: {search_results}"
|
128
|
+
)
|
129
|
+
answer = llm.invoke(prompt.format(
|
130
|
+
question=question,
|
131
|
+
search_results=[r["content"] for r in search_results]
|
132
|
+
))
|
133
|
+
answers.append({
|
134
|
+
"question": question,
|
135
|
+
"answer": answer.content,
|
136
|
+
"sources": [r["url"] for r in search_results]
|
137
|
+
})
|
138
|
+
return {"answers": answers, "status": "researched"}
|
139
|
+
|
140
|
+
def synthesize_findings(state: ResearchState) -> ResearchState:
|
141
|
+
"""Synthesize answers into a cohesive report."""
|
142
|
+
prompt = PromptTemplate(
|
143
|
+
input_variables=["topic", "answers"],
|
144
|
+
template="Synthesize a 200-word report on '{topic}' using these findings:\n{answers}"
|
145
|
+
)
|
146
|
+
synthesis = llm.invoke(prompt.format(
|
147
|
+
topic=state["topic"],
|
148
|
+
answers="\n".join([f"Q: {a['question']}\nA: {a['answer']}" for a in state["answers"]])
|
149
|
+
))
|
150
|
+
return {"synthesis": synthesis.content, "status": "synthesized"}
|
151
|
+
|
152
|
+
def critique_synthesis(state: ResearchState) -> ResearchState:
|
153
|
+
"""Critique the synthesis for completeness and accuracy."""
|
154
|
+
prompt = PromptTemplate(
|
155
|
+
input_variables=["topic", "synthesis", "answers"],
|
156
|
+
template="Critique this report on '{topic}':\n{synthesis}\nBased on: {answers}\nReturn 'pass' or issues."
|
157
|
+
)
|
158
|
+
critique = llm.invoke(prompt.format(
|
159
|
+
topic=state["topic"],
|
160
|
+
synthesis=state["synthesis"],
|
161
|
+
answers="\n".join([f"Q: {a['question']}\nA: {a['answer']}" for a in state["answers"]])
|
162
|
+
))
|
163
|
+
return {"criticism": critique.content}
|
164
|
+
|
165
|
+
def refine_synthesis(state: ResearchState) -> ResearchState:
|
166
|
+
"""Refine the synthesis based on critique."""
|
167
|
+
prompt = PromptTemplate(
|
168
|
+
input_variables=["topic", "synthesis", "critique", "answers"],
|
169
|
+
template="Refine this report on '{topic}':\n{synthesis}\nFix these issues: {critique}\nUsing: {answers}"
|
170
|
+
)
|
171
|
+
refined = llm.invoke(prompt.format(
|
172
|
+
topic=state["topic"],
|
173
|
+
synthesis=state["synthesis"],
|
174
|
+
critique=state["criticism"],
|
175
|
+
answers="\n".join([f"Q: {a['question']}\nA: {a['answer']}" for a in state["answers"]])
|
176
|
+
))
|
177
|
+
return {"synthesis": refined.content, "iteration": state["iteration"] + 1, "status": "refined"}
|
178
|
+
|
179
|
+
# Conditional logic
|
180
|
+
def should_refine(state: ResearchState) -> str:
|
181
|
+
if "pass" in state["criticism"].lower() or state["iteration"] >= 2:
|
182
|
+
return "end"
|
183
|
+
return "refine"
|
184
|
+
|
185
|
+
# State graph
|
186
|
+
workflow = StateGraph(ResearchState)
|
187
|
+
workflow.add_node("generate", generate_sub_questions)
|
188
|
+
workflow.add_node("research", research_sub_questions)
|
189
|
+
workflow.add_node("synthesize", synthesize_findings)
|
190
|
+
workflow.add_node("critique", critique_synthesis)
|
191
|
+
workflow.add_node("refine", refine_synthesis)
|
192
|
+
|
193
|
+
# Workflow
|
194
|
+
workflow.set_entry_point("generate")
|
195
|
+
workflow.add_edge("generate", "research")
|
196
|
+
workflow.add_edge("research", "synthesize")
|
197
|
+
workflow.add_edge("synthesize", "critique")
|
198
|
+
workflow.add_conditional_edges(
|
199
|
+
"critique",
|
200
|
+
should_refine,
|
201
|
+
{"refine": "refine", "end": END}
|
202
|
+
)
|
203
|
+
workflow.add_edge("refine", "critique")
|
204
|
+
|
205
|
+
# Compile the workflow
|
206
|
+
app = workflow.compile()
|
207
|
+
|
208
|
+
def run_research_assistant(topic: str = "Impact of AI on healthcare by 2030", print_results: bool = True) -> Dict[str, Any]:
|
209
|
+
"""Run the research assistant workflow with the given topic.
|
210
|
+
|
211
|
+
Args:
|
212
|
+
topic: The research topic to investigate
|
213
|
+
print_results: Whether to print the results to the console
|
214
|
+
|
215
|
+
Returns:
|
216
|
+
The final state of the workflow
|
217
|
+
"""
|
218
|
+
# Initialize the state
|
219
|
+
initial_state = {
|
220
|
+
"topic": topic,
|
221
|
+
"sub_questions": [],
|
222
|
+
"answers": [],
|
223
|
+
"synthesis": "",
|
224
|
+
"criticism": "",
|
225
|
+
"iteration": 0,
|
226
|
+
"status": "start"
|
227
|
+
}
|
228
|
+
|
229
|
+
# Start timing
|
230
|
+
start_time = time.time()
|
231
|
+
|
232
|
+
# Run the workflow with tracing
|
233
|
+
if print_results:
|
234
|
+
print(f"Starting the Personal Research Assistant for topic: '{topic}'...")
|
235
|
+
|
236
|
+
result = app.invoke(initial_state)
|
237
|
+
|
238
|
+
# Calculate duration
|
239
|
+
duration = time.time() - start_time
|
240
|
+
|
241
|
+
# Print results if requested
|
242
|
+
if print_results:
|
243
|
+
print("\nFinal Research Report:")
|
244
|
+
print(f"Topic: {result['topic']}")
|
245
|
+
print("\nSub-Questions:")
|
246
|
+
for i, question in enumerate(result['sub_questions'], 1):
|
247
|
+
print(f" {i}. {question}")
|
248
|
+
|
249
|
+
print("\nResearch Findings:")
|
250
|
+
for i, ans in enumerate(result["answers"], 1):
|
251
|
+
print(f"\nQ{i}: {ans['question']}")
|
252
|
+
print(f"A: {ans['answer']}")
|
253
|
+
print(f"Sources: {ans['sources']}")
|
254
|
+
|
255
|
+
print(f"\nSynthesis:\n{result['synthesis']}")
|
256
|
+
print(f"\nCritique: {result['criticism']}")
|
257
|
+
print(f"Iterations: {result['iteration']}")
|
258
|
+
print(f"Total execution time: {duration:.2f} seconds")
|
259
|
+
|
260
|
+
return result
|
261
|
+
|
262
|
+
if __name__ == "__main__":
|
263
|
+
run_research_assistant()
|
264
|
+
|
265
|
+
```
|
@@ -8,7 +8,7 @@ description = "RAGA AI CATALYST"
|
|
8
8
|
readme = "README.md"
|
9
9
|
requires-python = ">=3.10,<=3.13.2"
|
10
10
|
# license = {file = "LICENSE"}
|
11
|
-
version = "2.1.7.
|
11
|
+
version = "2.1.7.2"
|
12
12
|
authors = [
|
13
13
|
{name = "Kiran Scaria", email = "kiran.scaria@raga.ai"},
|
14
14
|
{name = "Kedar Gaikwad", email = "kedar.gaikwad@raga.ai"},
|