-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Bug Description
The documentation example for ProductDocsRetrieval shows the following configuration:
from cogsol.content import BaseRetrieval, ReorderingStrategy
# class ProductDocsRetrieval(BaseRetrieval):
# """Sample retrieval configuration."""
#
# name = "product_docs_search"
# topic = "product_docs"
# num_refs = 10
# reordering = False
# strategy_reordering = ReorderingStrategy.NONE
# formatters = {}
# filters = []
However, setting topic = "product_docs" (a string) does not work. According to the cogsolframeworkagent agent structure, topic must reference the corresponding Topic class (e.g., DocumentTopic), not a string.
Additionally, the required import for the topic class is not documented.
To Reproduce
Steps to reproduce the behavior:
- Copy the example retrieval configuration from the documentation.
- Keep topic = "product_docs" as shown.
- Attempt to use the retrieval in the agent.
- Observe that the retrieval does not function correctly because the topic is not properly configured as a class reference.
Expected Behavior
The documentation should show the correct configuration, using a Topic class reference instead of a string. For example:
from data.Product.Documents import DocumentTopic
topic = DocumentTopic
The guide should also clarify the required import path pattern, such as:
from data.<ParentNode>.<ChildNode> import <ChildNode>Topic
Actual Behavior
The example uses a string value for topic.
Environment
OS: [Windows 11]
Python version: [Python 3.11.9]
CogSol version: [0.2.0]
Additional Context
Given the project structure:
data/
├── __init__.py
├── Product/
│ └── Documents/
├── formatters.py
├── ingestion.py
├── retrievals.py
└── migrations/
It would be helpful for the documentation to clearly state that topics must be imported as classes and follow the module path structure:
`
from data.ParentNode.ChildNode import ChildNodeTopic
`
Clarifying this would prevent configuration errors and improve developer onboarding.