Issue 4: Feature/chainlit UI enhancement#26
Conversation
WalkthroughThe updates introduce a comprehensive refactor of the claim detection and fact-checking pipeline. The claim model is expanded with detailed fields and stricter validation, the agent prompt is enhanced, and the pipeline now uses structured, hierarchical progress reporting. Dependency versions are updated, new configuration and tests are added, and error handling is improved. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant App
participant VerifactManager
participant ClaimDetector
participant EvidenceGatherer
participant VerdictGenerator
User->>App: Sends query
App->>VerifactManager: run(query, progress_callback)
VerifactManager->>ClaimDetector: Detect claims
ClaimDetector-->>VerifactManager: List of claims
VerifactManager->>App: progress_callback("claims_detected", claims)
loop For each claim
VerifactManager->>EvidenceGatherer: Gather evidence
EvidenceGatherer-->>VerifactManager: Evidence list
VerifactManager->>App: progress_callback("step_start", claim)
VerifactManager->>VerdictGenerator: Generate verdict
VerdictGenerator-->>VerifactManager: Verdict
VerifactManager->>App: progress_callback("step_end", claim)
end
VerifactManager-->>App: Return verdicts
App-->>User: Display formatted results
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 11
🔭 Outside diff range comments (1)
src/verifact_manager.py (1)
157-165:⚠️ Potential issueFix duplicate query assignment that removes context handling.
The second query assignment overwrites the first and removes the context handling logic. This appears to be a mistake that eliminates the benefit of having context in the Claim model.
query = f""" Claim to investigate: {claim.text} Context of the claim: {claim.context if hasattr(claim, "context") and claim.context else "No additional context provided"} """ - query = f""" - Claim to investigate: {claim.text} - Context of the claim: No additional context provided - """
🧹 Nitpick comments (5)
.vscode/settings.json (1)
15-18: Editor defaults creep into repo settingsProject-level settings such as
"editor.folding": falseand"debug.allowBreakpointsEverywhere": trueare subjective and may clash with other contributors’ preferences. Consider moving personal IDE tweaks to your user settings or, at minimum, placing them under.vscode/example.settings.jsonso they aren’t enforced on everyone.Also applies to: 45-49
app.py (1)
19-22: Avoid shadowing the built-intypeand prefer explicit naming
progress_callback(type: str, data: dict)shadows Python’stypebuilt-in and makes stack-traces harder to read. Rename toevent_type/event_data.- async def progress_callback(type: str, data: dict): + async def progress_callback(event_type: str, data: dict):src/tests/test_claim_detector.py (1)
1-133: Clean up formatting issues.The file has several formatting issues that should be addressed:
- Remove trailing whitespace from blank lines (51, 74, 77, 89, 97, 108, 119)
- Add a newline at the end of the file (line 133)
🧰 Tools
🪛 Ruff (0.11.9)
51-51: Blank line contains whitespace
Remove whitespace from blank line
(W293)
74-74: Blank line contains whitespace
Remove whitespace from blank line
(W293)
77-77: Blank line contains whitespace
Remove whitespace from blank line
(W293)
89-89: Blank line contains whitespace
Remove whitespace from blank line
(W293)
97-97: Blank line contains whitespace
Remove whitespace from blank line
(W293)
108-108: Blank line contains whitespace
Remove whitespace from blank line
(W293)
119-119: Blank line contains whitespace
Remove whitespace from blank line
(W293)
120-120: Use
isandis notfor type comparisons, orisinstance()for isinstance checks(E721)
133-133: No newline at end of file
Add trailing newline
(W292)
src/verifact_agents/claim_detector.py (1)
22-22: Consider using modern union type syntax.For Python 3.10+, you can use the more concise union syntax.
-from typing import Optional - context: Optional[str] = Field( + context: str | None = Field( ... - entities: Optional[list[dict[str, str]]] = Field( + entities: list[dict[str, str]] | None = Field( ... - compound_claim_parts: Optional[list[str]] = Field( + compound_claim_parts: list[str] | None = Field(Also applies to: 58-58, 63-63
🧰 Tools
🪛 Ruff (0.11.9)
22-22: Use
X | Yfor type annotationsConvert to
X | Y(UP007)
src/verifact_manager.py (1)
232-232: Remove unnecessary f-string prefix.The string doesn't contain any placeholders, so the f-prefix is not needed.
- logger.warning(f"Skipping claim - no evidence found") + logger.warning("Skipping claim - no evidence found")🧰 Tools
🪛 Ruff (0.11.9)
232-232: f-string without any placeholders
Remove extraneous
fprefix(F541)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (8)
.python-version(1 hunks).vscode/settings.json(2 hunks)app.py(2 hunks)pyproject.toml(1 hunks)src/tests/test_claim_detector.py(1 hunks)src/utils/logging/logging_config.py(1 hunks)src/verifact_agents/claim_detector.py(3 hunks)src/verifact_manager.py(4 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
src/tests/test_claim_detector.py (1)
src/verifact_agents/claim_detector.py (1)
Claim(7-70)
src/verifact_agents/claim_detector.py (1)
src/verifact_agents/base.py (1)
Agent(12-16)
🪛 Ruff (0.11.9)
src/tests/test_claim_detector.py
51-51: Blank line contains whitespace
Remove whitespace from blank line
(W293)
74-74: Blank line contains whitespace
Remove whitespace from blank line
(W293)
77-77: Blank line contains whitespace
Remove whitespace from blank line
(W293)
89-89: Blank line contains whitespace
Remove whitespace from blank line
(W293)
97-97: Blank line contains whitespace
Remove whitespace from blank line
(W293)
108-108: Blank line contains whitespace
Remove whitespace from blank line
(W293)
119-119: Blank line contains whitespace
Remove whitespace from blank line
(W293)
120-120: Use is and is not for type comparisons, or isinstance() for isinstance checks
(E721)
133-133: No newline at end of file
Add trailing newline
(W292)
app.py
12-12: Missing docstring in public function
(D103)
143-143: Missing docstring in public function
(D103)
src/verifact_agents/claim_detector.py
22-22: Use X | Y for type annotations
Convert to X | Y
(UP007)
58-58: Use X | Y for type annotations
Convert to X | Y
(UP007)
63-63: Use X | Y for type annotations
Convert to X | Y
(UP007)
src/verifact_manager.py
13-13: re.A imported but unused
Remove unused import
(F401)
13-13: re.I imported but unused
Remove unused import
(F401)
14-14: signal.raise_signal imported but unused
Remove unused import: signal.raise_signal
(F401)
15-15: chainlit imported but unused
Remove unused import: chainlit
(F401)
44-44: Missing docstring in public method
(D102)
184-184: zip() without an explicit strict= parameter
Add explicit value for parameter strict=
(B905)
232-232: f-string without any placeholders
Remove extraneous f prefix
(F541)
🪛 Pylint (3.3.7)
app.py
[refactor] 12-12: Too many local variables (19/15)
(R0914)
[refactor] 12-12: Too many statements (62/50)
(R0915)
src/verifact_agents/claim_detector.py
[refactor] 7-7: Too few public methods (0/2)
(R0903)
src/verifact_manager.py
[refactor] 44-44: Too many branches (16/12)
(R0912)
🔇 Additional comments (4)
pyproject.toml (1)
41-42: Dependency pinning may unintentionally freeze you on an oldopenai-agentsreleaseSwitching from a lower-bound (
>=) to an upper-bound (<=0.0.16) stops you from pulling in bug-fixes and security patches that might appear after 0.0.16. Unless you have a hard compatibility break, prefer a bounded range:- "openai-agents<=0.0.16", + "openai-agents>=0.0.14,<0.0.17", # or whatever range you have verifiedLikewise, ensure
chainlit>=1.0works with the rest of the stack (there were breaking changes between beta and 1.0)..python-version (1)
1-1: CI / runtime images must be bumped to 3.11.6The dev-container now targets 3.11.6, but
pyproject.tomlstill advertisesrequires-python = ">=3.10". Make sure Docker images, CI runners and production hosts are upgraded; otherwise you’ll get the classic “invalid interpreter” drift.src/utils/logging/logging_config.py (1)
38-38: LGTM – newline onlyNo functional change; good to keep the file POSIX-clean.
app.py (1)
37-43:step_errormay raiseIndexErrorif stack underflowsIf the pipeline emits two consecutive
"step_error"events (or an error before any"step_start"),active_step_id_stack.pop()will fail. Guard the pop:- step_id = active_step_id_stack.pop() + if not active_step_id_stack: + logger.warning("step_error received but stack is empty") + return + step_id = active_step_id_stack.pop()
| claim_id = f"claim_{i+1}" | ||
| claim_step = cl.Step( | ||
| name=f'Claim {i+1}: "{claim.text[:60]}..."', | ||
| parent_id=main_pipeline_id, | ||
| id=claim_id, | ||
| ) | ||
| steps[claim_id] = claim_step |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Same collision risk for per-claim steps
claim_1, claim_2, … will collide across sessions. Omit the id parameter entirely; you already store the Step object in steps[claim_id].
🤖 Prompt for AI Agents
In app.py around lines 49 to 55, the claim step IDs like "claim_1", "claim_2"
risk colliding across sessions. To fix this, remove the explicit id parameter
from the Step constructor when creating claim_step. Since you already store each
Step object in the steps dictionary keyed by claim_id, you don't need to assign
an id to the Step itself. This avoids ID collisions while preserving access to
each step.
| # Close the main pipeline step and set its final output | ||
| steps["Fact-Checking Pipeline"].output = response | ||
| await steps["Fact-Checking Pipeline"].update() | ||
| active_step_id_stack.pop() # Final pop for the main step | ||
|
|
There was a problem hiding this comment.
🛠️ Refactor suggestion
Main step never gets a formal step_end event
You update the output and pop the stack, but the step remains in “running” state in the UI. Close it via the callback for consistency:
- steps["Fact-Checking Pipeline"].output = response
- await steps["Fact-Checking Pipeline"].update()
- active_step_id_stack.pop() # Final pop for the main step
+ await progress_callback(
+ event_type="step_end",
+ data={"output": response},
+ )📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Close the main pipeline step and set its final output | |
| steps["Fact-Checking Pipeline"].output = response | |
| await steps["Fact-Checking Pipeline"].update() | |
| active_step_id_stack.pop() # Final pop for the main step | |
| # Close the main pipeline step and set its final output | |
| - steps["Fact-Checking Pipeline"].output = response | |
| - await steps["Fact-Checking Pipeline"].update() | |
| - active_step_id_stack.pop() # Final pop for the main step | |
| + await progress_callback( | |
| + event_type="step_end", | |
| + data={"output": response}, | |
| + ) |
🤖 Prompt for AI Agents
In app.py around lines 125 to 129, the main pipeline step is updated and popped
from the active step stack but never formally closed with a step_end event,
causing it to remain in a "running" state in the UI. To fix this, invoke the
step_end callback or method on the "Fact-Checking Pipeline" step before popping
it from the stack to properly close the step and update its state.
| import logging | ||
|
|
||
| logging.basicConfig(level=logging.INFO) | ||
| logger = logging.getLogger(__name__) | ||
|
|
There was a problem hiding this comment.
🛠️ Refactor suggestion
Duplicate logger setup; central setup_logging() is ignored
logging.basicConfig() here overrides the richer configuration in src/utils/logging/logging_config.py. Import and call setup_logging() instead of re-initialising the root logger:
-import logging
-
-logging.basicConfig(level=logging.INFO)
-logger = logging.getLogger(__name__)
+from src.utils.logging.logging_config import setup_logging
+
+setup_logging()
+logger = logging.getLogger(__name__)Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In app.py around lines 3 to 7, remove the duplicate logging setup using
logging.basicConfig and logger = logging.getLogger(__name__). Instead, import
the setup_logging() function from src/utils/logging/logging_config.py and call
it at the start of the file to initialize logging with the centralized, richer
configuration.
| step = cl.Step(name=data["title"], parent_id=parent_id, id=data["title"]) | ||
| steps[data["title"]] = step | ||
| active_step_id_stack.append(step.id) # Push new step to stack |
There was a problem hiding this comment.
Step IDs should be globally unique – titles are not
Using id=data["title"] risks collisions when two concurrent conversations both create a "Fact-Checking Pipeline" step. Let Chainlit auto-generate IDs or use uuid4():
-from uuid import uuid4
-...
- step = cl.Step(name=data["title"], parent_id=parent_id, id=data["title"])
+from uuid import uuid4
+...
+ step = cl.Step(name=data["title"], parent_id=parent_id, id=str(uuid4()))📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| step = cl.Step(name=data["title"], parent_id=parent_id, id=data["title"]) | |
| steps[data["title"]] = step | |
| active_step_id_stack.append(step.id) # Push new step to stack | |
| from uuid import uuid4 | |
| # … other code … | |
| step = cl.Step( | |
| name=data["title"], | |
| parent_id=parent_id, | |
| - id=data["title"] | |
| + id=str(uuid4()) | |
| ) | |
| steps[data["title"]] = step | |
| active_step_id_stack.append(step.id) # Push new step to stack |
🤖 Prompt for AI Agents
In app.py around lines 25 to 27, the step ID is set to the step title, which can
cause collisions if multiple steps share the same title. To fix this, remove the
explicit id assignment using the title and either let Chainlit auto-generate the
ID or assign a unique ID using uuid4(). This ensures all step IDs are globally
unique and prevents conflicts in concurrent conversations.
| assert claim_detector_agent.output_type.__origin__ == list # Checks if it's a list type | ||
| assert claim_detector_agent.output_type.__args__[0] == Claim # Checks if the list contains Claim |
There was a problem hiding this comment.
Use proper type checking methods.
Direct comparison with == for types is not recommended. Use isinstance() or is for type checks.
- assert claim_detector_agent.output_type.__origin__ == list # Checks if it's a list type
- assert claim_detector_agent.output_type.__args__[0] == Claim # Checks if the list contains Claim
+ assert claim_detector_agent.output_type.__origin__ is list # Checks if it's a list type
+ assert claim_detector_agent.output_type.__args__[0] is Claim # Checks if the list contains Claim📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| assert claim_detector_agent.output_type.__origin__ == list # Checks if it's a list type | |
| assert claim_detector_agent.output_type.__args__[0] == Claim # Checks if the list contains Claim | |
| assert claim_detector_agent.output_type.__origin__ is list # Checks if it's a list type | |
| assert claim_detector_agent.output_type.__args__[0] is Claim # Checks if the list contains Claim |
🧰 Tools
🪛 Ruff (0.11.9)
120-120: Use is and is not for type comparisons, or isinstance() for isinstance checks
(E721)
🤖 Prompt for AI Agents
In src/tests/test_claim_detector.py at lines 120 to 121, replace the direct
equality checks (==) for type comparison with proper type checking using 'is'
for identity comparison. Change the assertions to use 'is' instead of '==' when
comparing __origin__ and __args__[0] to ensure correct and recommended type
checking.
| 2. Provide any immediate surrounding context if it's relevant for understanding or verifying the claim. | ||
| 2. Score each claim's check-worthiness, specificity, public interest, and impact | ||
| 3. Extract and categorize entities mentioned in claims | ||
| 4. Classify claims by domain (politics, science, health, etc.) | ||
| 5. Normalize claims to a standard format | ||
| 6. Split compound claims into separate checkable statements | ||
| 7. Rank claims by overall importance for fact-checking | ||
| 8. Provide any immediate surrounding context if it's relevant for understanding or verifying the claim. This context should be brief and directly related to the claim itself. |
There was a problem hiding this comment.
Remove duplicate context instruction.
The instruction to provide context for claims appears twice in the task list (items 2 and 8). This redundancy should be eliminated.
Your task is to:
1. Identify explicit and implicit factual claims
-2. Provide any immediate surrounding context if it's relevant for understanding or verifying the claim.
-2. Score each claim's check-worthiness, specificity, public interest, and impact
+2. Score each claim's check-worthiness, specificity, public interest, and impact
3. Extract and categorize entities mentioned in claims
4. Classify claims by domain (politics, science, health, etc.)
5. Normalize claims to a standard format
6. Split compound claims into separate checkable statements
7. Rank claims by overall importance for fact-checking
8. Provide any immediate surrounding context if it's relevant for understanding or verifying the claim. This context should be brief and directly related to the claim itself.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| 2. Provide any immediate surrounding context if it's relevant for understanding or verifying the claim. | |
| 2. Score each claim's check-worthiness, specificity, public interest, and impact | |
| 3. Extract and categorize entities mentioned in claims | |
| 4. Classify claims by domain (politics, science, health, etc.) | |
| 5. Normalize claims to a standard format | |
| 6. Split compound claims into separate checkable statements | |
| 7. Rank claims by overall importance for fact-checking | |
| 8. Provide any immediate surrounding context if it's relevant for understanding or verifying the claim. This context should be brief and directly related to the claim itself. | |
| Your task is to: | |
| 1. Identify explicit and implicit factual claims | |
| 2. Score each claim's check-worthiness, specificity, public interest, and impact | |
| 3. Extract and categorize entities mentioned in claims | |
| 4. Classify claims by domain (politics, science, health, etc.) | |
| 5. Normalize claims to a standard format | |
| 6. Split compound claims into separate checkable statements | |
| 7. Rank claims by overall importance for fact-checking | |
| 8. Provide any immediate surrounding context if it's relevant for understanding or verifying the claim. This context should be brief and directly related to the claim itself. |
🤖 Prompt for AI Agents
In src/verifact_agents/claim_detector.py around lines 78 to 85, the task list
includes a duplicate instruction to provide immediate surrounding context for
claims at both items 2 and 8. Remove the redundant instruction so that the
context provision appears only once in the list, ensuring the task list is
concise and free of repetition.
| async def _generate_verdicts( | ||
| self, claims_with_evidence: list[tuple[Claim, list[Evidence]]] | ||
| ) -> list[Verdict]: | ||
| logger.info("Generating verdicts for claims...") | ||
| verdicts = [] | ||
| for claim, evidence in claims_with_evidence: | ||
| verdict = await Runner.run(verdict_writer_agent, claim, evidence) | ||
| verdicts.append(verdict.final_output_as(Verdict)) | ||
| logger.info(f"Generated verdicts for {len(claims_with_evidence)} claims") | ||
|
|
There was a problem hiding this comment.
Fix incomplete _generate_verdicts method.
This method appears to be incomplete or incorrect. The Runner.run call passes claim and evidence as separate arguments, but based on other usage in the codebase, it should format them into a prompt string.
The method is currently unused, but if it's intended for future use, it should follow the same pattern as _generate_verdict_for_claim.
🤖 Prompt for AI Agents
In src/verifact_manager.py around lines 214 to 223, the _generate_verdicts
method incorrectly calls Runner.run by passing claim and evidence as separate
arguments instead of formatting them into a prompt string. To fix this, refactor
the method to construct a prompt string for each claim and its evidence
following the pattern used in _generate_verdict_for_claim, then pass this prompt
string to Runner.run. This will ensure the method is complete and consistent
with the rest of the codebase.
| logger.error( | ||
| f"Error gathering evidence for claim: {claim.text[:50]}: {result.message}", | ||
| exc_info=True, | ||
| ) |
There was a problem hiding this comment.
Fix error message access in exception handling.
Exceptions don't have a .message attribute in Python 3. Use str(result) instead.
logger.error(
- f"Error gathering evidence for claim: {claim.text[:50]}: {result.message}",
+ f"Error gathering evidence for claim: {claim.text[:50]}: {str(result)}",
exc_info=True,
)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| logger.error( | |
| f"Error gathering evidence for claim: {claim.text[:50]}: {result.message}", | |
| exc_info=True, | |
| ) | |
| logger.error( | |
| f"Error gathering evidence for claim: {claim.text[:50]}: {str(result)}", | |
| exc_info=True, | |
| ) |
🤖 Prompt for AI Agents
In src/verifact_manager.py around lines 186 to 189, the error handling code
incorrectly accesses the exception message using result.message, which is not
valid in Python 3. Replace result.message with str(result) to correctly convert
the exception to its string representation for logging.
| from re import A, I | ||
| from signal import raise_signal | ||
| import chainlit as cl |
There was a problem hiding this comment.
Remove unused imports.
These imports are not used in the code and should be removed.
-from re import A, I
-from signal import raise_signal
import chainlit as clCommittable suggestion skipped: line range outside the PR's diff.
🧰 Tools
🪛 Ruff (0.11.9)
13-13: re.A imported but unused
Remove unused import
(F401)
13-13: re.I imported but unused
Remove unused import
(F401)
14-14: signal.raise_signal imported but unused
Remove unused import: signal.raise_signal
(F401)
15-15: chainlit imported but unused
Remove unused import: chainlit
(F401)
🤖 Prompt for AI Agents
In src/verifact_manager.py around lines 13 to 15, the imports 'A' and 'I' from
're' and 'raise_signal' from 'signal' are not used anywhere in the code. Remove
these unused imports to clean up the code and avoid unnecessary dependencies.
| List[Verdict]: A list of verdicts for claims in the text | ||
| """ | ||
| # Replace the run method with this one | ||
| async def run(self, query: str, progress_callback=None) -> list: |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Add docstring to public method.
The run method is a public API and should have a docstring explaining its purpose, parameters, and return value.
async def run(self, query: str, progress_callback=None) -> list:
+ """Execute the fact-checking pipeline on the given query.
+
+ Args:
+ query: The input text to fact-check
+ progress_callback: Optional async callback for progress updates
+
+ Returns:
+ List of tuples containing (claim, evidence, verdict) for each processed claim
+ """
trace_id = gen_trace_id()📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| async def run(self, query: str, progress_callback=None) -> list: | |
| async def run(self, query: str, progress_callback=None) -> list: | |
| """Execute the fact-checking pipeline on the given query. | |
| Args: | |
| query: The input text to fact-check | |
| progress_callback: Optional async callback for progress updates | |
| Returns: | |
| List of tuples containing (claim, evidence, verdict) for each processed claim | |
| """ | |
| trace_id = gen_trace_id() |
🧰 Tools
🪛 Ruff (0.11.9)
44-44: Missing docstring in public method
(D102)
🪛 Pylint (3.3.7)
[refactor] 44-44: Too many branches (16/12)
(R0912)
🤖 Prompt for AI Agents
In src/verifact_manager.py at line 44, the public async method run lacks a
docstring. Add a clear docstring immediately below the method definition that
describes the method's purpose, details the parameters including query and
progress_callback, and explains the return type and value.
Task 1 of this issue, Add step visualization for the factchecking pipeline, is implemented using Chainlit's Step feature. After a user prompt is submitted, the Chainlit UI shows a collapsible arrow for each agent when they are taking care of their tasks. By default, Chainlit has the print-outs of each step displayed in its collapsible side bar. A user needs to manually click on the collapsible arrows to see the processing texts. Later, we might add the feature to have such texts displayed automatically on the UI without the need to click on the arrows.
Type of change
Please delete options that are not relevant.
Checklist
Agent Changes (if applicable)