Skip to content

Commit 6efcf2a

Browse files
authored
Merge pull request #109 from kazmer97/feat/agentic-multi-step-extraction
strands got stuck in summarisation loop
2 parents c2dd0e3 + 9e877c1 commit 6efcf2a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/idp_common_pkg/idp_common/extraction/agentic_idp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ async def structured_output_async(
557557
final_system_prompt = f"{system_prompt}\n\nCustom Instructions for this specific task: {custom_instruction}"
558558
logger.debug("Running extraction", extra={"system_prompt": final_system_prompt})
559559
agent = Agent(
560-
model=BedrockModel(**model_config),
560+
model=BedrockModel(**model_config), # pyright: ignore[reportArgumentType]
561561
tools=tools,
562562
system_prompt=f"{final_system_prompt}\n\nExpected Schema:\n{schema_json}",
563563
state={
@@ -566,7 +566,7 @@ async def structured_output_async(
566566
"existing_data": existing_data.model_dump() if existing_data else None,
567567
},
568568
conversation_manager=SummarizingConversationManager(
569-
summary_ratio=0.5,
569+
summary_ratio=0.8,
570570
),
571571
)
572572

@@ -637,7 +637,7 @@ async def structured_output_async(
637637

638638
for attempt in range(max_retries):
639639
try:
640-
response = await agent.invoke_async(prompt_content) # pyright: ignore[reportArgumentType]
640+
response = await agent.invoke_async(prompt_content)
641641
logger.debug("Agent response received")
642642
break # Success, exit retry loop
643643
except Exception as e:

0 commit comments

Comments
 (0)