Skip to content

langchain connector#85

Merged
ofermend merged 5 commits intodevfrom
langchain_connector
May 9, 2025
Merged

langchain connector#85
ofermend merged 5 commits intodevfrom
langchain_connector

Conversation

@ofermend
Copy link
Collaborator

@ofermend ofermend commented May 9, 2025

No description provided.

@ofermend ofermend requested a review from Copilot May 9, 2025 15:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new LangChain connector along with accompanying tests and configuration examples. It renames a test class in the LlamaIndex connector tests, adds tests for the LangChain connector, implements the new connector, and provides an example YAML configuration file.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

File Description
tests/test_llamaindex_connector.py Renamed test class from TestVectaraConnector to TestLlamaIndexConnector.
tests/test_langchain_connector.py Added tests validating the new LangChainConnector functionality.
open_rag_eval/connectors/langchain_connector.py Introduces the LangChainConnector using the latest LangChain APIs.
config_examples/eval_config_langchain.yaml Provides example YAML configuration for evaluating the LangChainConnector.

@ofermend ofermend requested review from Copilot and sulekz May 9, 2025 17:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new LangchainConnector along with corresponding tests and configuration examples to support retrieval and answer generation using LangChain.

  • Added new LangchainConnector implementation in open_rag_eval/connectors/langchain_connector.py.
  • Introduced new tests in tests/test_langchain_connector.py and updated related test files and configuration examples.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_llamaindex_connector.py Renamed test class to reflect target connector.
tests/test_langchain_connector.py Added tests for LangchainConnector ensuring CSV output is correctly generated.
open_rag_eval/connectors/llama_index_connector.py Minor update; added citation_chunk_size settings.
open_rag_eval/connectors/langchain_connector.py New connector implementation using LangChain components.
open_rag_eval/connectors/init.py Updated module exports to include LangchainConnector.
config_examples/eval_config_vectara.yaml Corrected comment typo.
config_examples/eval_config_llama_index.yaml Corrected comment typo.
config_examples/eval_config_langchain.yaml New configuration example for LangchainConnector.
Comments suppressed due to low confidence (2)

config_examples/eval_config_langchain.yaml:19

  • [nitpick] The connector type in the configuration ('LangChainConnector') differs in capitalization from the class name ('LangchainConnector'); standardize the naming for consistency.
type: "LangChainConnector"

open_rag_eval/connectors/langchain_connector.py:81

  • Usage of 'invoke' on self.retriever (and on self.rag_chain) may not align with standard retrieval API methods in LangChain; verify that this method is supported in the current LangChain version.
generated_answer = self.rag_chain.invoke(actual_query)

@ofermend ofermend requested a review from Copilot May 9, 2025 18:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new LangChainConnector implementation along with its corresponding tests and updates various configuration examples, while also renaming the test class for LlamaIndexConnector.

  • Renamed the test class in tests/test_llamaindex_connector.py to reflect the LlamaIndex connector.
  • Added a new LangChainConnector implementation and associated tests.
  • Fixed spelling issues in configuration example comments and updated configuration parameters.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/test_llamaindex_connector.py Renamed test class from TestVectaraConnector to TestLlamaIndexConnector.
tests/test_langchain_connector.py Added tests for the new LangChainConnector implementation.
open_rag_eval/connectors/llama_index_connector.py Updated citation chunk parameters in the CitationQueryEngine initialization.
open_rag_eval/connectors/langchain_connector.py Introduced a new connector using LangChain components with operator chaining.
open_rag_eval/connectors/init.py Added LangChainConnector to the module exports.
config_examples/eval_config_vectara.yaml Fixed a spelling mistake in the comments and updated configuration limits.
config_examples/eval_config_llama_index.yaml Fixed a spelling mistake in the comments.
config_examples/eval_config_langchain.yaml Added a new configuration example for the LangChainConnector.
Comments suppressed due to low confidence (1)

tests/test_llamaindex_connector.py:18

  • The test class has been renamed from 'TestVectaraConnector' to 'TestLlamaIndexConnector'. Ensure that the new name accurately reflects the functionality being tested in the context of the LlamaIndex connector.
class TestLlamaIndexConnector(unittest.TestCase):

Copy link
Contributor

@sulekz sulekz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ofermend ofermend merged commit 501722b into dev May 9, 2025
1 check failed
@ofermend ofermend deleted the langchain_connector branch May 9, 2025 20:15
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