From e3ebf45a18bce00380bf7f8d8a05e2feb95e5c65 Mon Sep 17 00:00:00 2001 From: yangdx Date: Wed, 10 Sep 2025 16:10:42 +0800 Subject: [PATCH] Add logging for missing brackets in extraction result processing --- lightrag/operate.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lightrag/operate.py b/lightrag/operate.py index 465ed764..fa715762 100644 --- a/lightrag/operate.py +++ b/lightrag/operate.py @@ -850,8 +850,16 @@ async def _process_extraction_result( record = record.strip() if record.startswith("(") or record.startswith("("): record = record[1:] + else: + logger.warning( + f"{chunk_key}: Record starting bracket can not be found in extraction result" + ) if record.endswith(")") or record.endswith(")"): record = record[:-1] + else: + logger.warning( + f"{chunk_key}: Record ending bracket can not be found in extraction result" + ) record = record.strip() if record is None: