Repository Analysis

langroid/langroid

Harness LLMs with Multi-Agent Programming

22.3 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of langroid/langroid, a Python project with 4,071 GitHub stars. SynthScan v2.0 examined 120,787 lines of code across 626 source files, recording 1727 pattern matches distributed across 23 syntactic categories. The overall adjusted score of 22.3 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

22.3
Adjusted Score
22.3
Raw Score
100%
Time Factor
2026-07-12
Last Push
4.1K
Stars
Python
Language
120.8K
Lines of Code
626
Files
1.7K
Pattern Hits
2026-07-14
Scan Date
0.27
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 171MEDIUM 205LOW 1351

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 1727 distinct pattern matches across 23 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Cross-File Repetition138 hits · 690 pts
SeverityFileLineSnippetContext
HIGHREADME.md0you will be given a number n. if it is odd, return (n*3+1), say nothing else. if it is even, say -10STRING
HIGHtests/main/test_recipient_tool_async.py0you will be given a number n. if it is odd, return (n*3+1), say nothing else. if it is even, say -10STRING
HIGHexamples/quick-start/three-agent-chat-num-router.py0you will be given a number n. if it is odd, return (n*3+1), say nothing else. if it is even, say -10STRING
HIGHREADME.md0to find how many numbers in my list are less than or equal to the <number> you specify.STRING
HIGHexamples/langdb/langdb_chat_agent_tool.py0to find how many numbers in my list are less than or equal to the <number> you specify.STRING
HIGHexamples/quick-start/chat-agent-tool.py0to find how many numbers in my list are less than or equal to the <number> you specify.STRING
HIGHREADME.md0done! successfully extracted lease info: {message.terms}STRING
HIGHexamples/chainlit/multi-extract.py0done! successfully extracted lease info: {message.terms}STRING
HIGHexamples/docqa/chat_multi_extract.py0done! successfully extracted lease info: {message.terms}STRING
HIGHtests/main/test_doc_chat_relevance.py0test window retrieval of relevant doc-chunks. check that we are retrieving 2 neighbors around each match.STRING
HIGHtests/main/test_doc_chat_agent.py0test window retrieval of relevant doc-chunks. check that we are retrieving 2 neighbors around each match.STRING
HIGHtests/extras/test_doc_chat_agent_llamacpp.py0test window retrieval of relevant doc-chunks. check that we are retrieving 2 neighbors around each match.STRING
HIGHtests/main/test_multi_agent_complex_async.py0you are a calculator. you will be given a multiplication problem. you simply reply with the answer, say nothing else.STRING
HIGHtests/main/test_multi_agent.py0you are a calculator. you will be given a multiplication problem. you simply reply with the answer, say nothing else.STRING
HIGHtests/main/test_multi_agent_complex.py0you are a calculator. you will be given a multiplication problem. you simply reply with the answer, say nothing else.STRING
HIGHtests/main/test_doc_chat_agent.py0in the year 2050, gpt10 was released. in 2057, paperclips were seen all over the world. global warming was solved in 206STRING
HIGHtests/extras/test_doc_chat_agent_llamacpp.py0in the year 2050, gpt10 was released. in 2057, paperclips were seen all over the world. global warming was solved in 206STRING
HIGHdocs/notes/weaviate.md0in the year 2050, gpt10 was released. in 2057, paperclips were seen all over the world. global warming was solved in 206STRING
HIGHdocs/notes/pgvector.md0in the year 2050, gpt10 was released. in 2057, paperclips were seen all over the world. global warming was solved in 206STRING
HIGHdocs/quick-start/chat-agent-docs.md0in the year 2050, gpt10 was released. in 2057, paperclips were seen all over the world. global warming was solved in 206STRING
HIGHexamples/langdb/langdb_chat_agent_docs.py0in the year 2050, gpt10 was released. in 2057, paperclips were seen all over the world. global warming was solved in 206STRING
HIGHexamples/quick-start/chat-agent-docs.py0in the year 2050, gpt10 was released. in 2057, paperclips were seen all over the world. global warming was solved in 206STRING
HIGHtests/main/test_doc_chat_agent.py0check we can ingest from a dataframe and run queries.STRING
HIGHtests/main/test_retriever_agent.py0check we can ingest from a dataframe and run queries.STRING
HIGHtests/extras/test_doc_chat_agent_llamacpp.py0check we can ingest from a dataframe and run queries.STRING
HIGHtests/main/test_tool_messages_async.py0test whether llm is able to generate message (tool) in required format, and the agent handles the message correctly. argSTRING
HIGHtests/main/test_stateless_tool_messages.py0test whether llm is able to generate message (tool) in required format, and the agent handles the message correctly. argSTRING
HIGHtests/main/test_tool_messages.py0test whether llm is able to generate message (tool) in required format, and the agent handles the message correctly. argSTRING
HIGHtests/main/test_tool_messages_azure.py0test whether llm is able to generate message (tool) in required format, and the agent handles the message correctly. argSTRING
HIGHdocs/FAQ.md0important: you must include an actual query in the `query` field,STRING
HIGHexamples/chainlit/chat-search-rag.py0important: you must include an actual query in the `query` field,STRING
HIGHexamples/docqa/chat_search.py0important: you must include an actual query in the `query` field,STRING
HIGHexamples/docqa/chat-search-filter.py0important: you must include an actual query in the `query` field,STRING
HIGHdocs/FAQ.md0------------------------------ ask me questions one by one, to fill in the fields of the `lease_info` function/tool. firSTRING
HIGHexamples/chainlit/multi-extract-3.py0------------------------------ ask me questions one by one, to fill in the fields of the `lease_info` function/tool. firSTRING
HIGHexamples/docqa/chat-multi-extract-3.py0------------------------------ ask me questions one by one, to fill in the fields of the `lease_info` function/tool. firSTRING
HIGHdocs/notes/weaviate.md0we are living in an alternate universe where germany has occupied the usa, and the capital of usa is berlin. charlie chaSTRING
HIGHdocs/notes/pgvector.md0we are living in an alternate universe where germany has occupied the usa, and the capital of usa is berlin. charlie chaSTRING
HIGHdocs/quick-start/chat-agent-docs.md0we are living in an alternate universe where germany has occupied the usa, and the capital of usa is berlin. charlie chaSTRING
HIGHexamples/langdb/langdb_chat_agent_docs.py0we are living in an alternate universe where germany has occupied the usa, and the capital of usa is berlin. charlie chaSTRING
HIGHexamples/quick-start/chat-agent-docs.py0we are living in an alternate universe where germany has occupied the usa, and the capital of usa is berlin. charlie chaSTRING
HIGHdocs/examples/agent-tree.md0this is a stateless tool (i.e. does not use any agent member vars), so we can define the handler right here, instead of STRING
HIGHexamples/basic/chat-tree-structured.py0this is a stateless tool (i.e. does not use any agent member vars), so we can define the handler right here, instead of STRING
HIGHexamples/basic/chat-tree.py0this is a stateless tool (i.e. does not use any agent member vars), so we can define the handler right here, instead of STRING
HIGHexamples/chainlit/chat-tree-chainlit.py0this is a stateless tool (i.e. does not use any agent member vars), so we can define the handler right here, instead of STRING
HIGHdocs/quick-start/chat-agent-tool.md0i have a list of numbers between 1 and 20. your job is to find the smallest of them. to help with this, you can give me STRING
HIGHexamples/langdb/langdb_chat_agent_tool.py0i have a list of numbers between 1 and 20. your job is to find the smallest of them. to help with this, you can give me STRING
HIGHexamples/quick-start/chat-agent-tool.py0i have a list of numbers between 1 and 20. your job is to find the smallest of them. to help with this, you can give me STRING
HIGHexamples/portkey/portkey_multi_provider.py0check if environment variable is set and return its value.STRING
HIGHexamples/portkey/portkey_advanced_features.py0check if environment variable is set and return its value.STRING
HIGHexamples/portkey/portkey_basic_chat.py0check if environment variable is set and return its value.STRING
HIGHexamples/chainlit/chat-search-rag.py0get docs/extracts relevant to the query, from vecdbSTRING
HIGHexamples/docqa/chat_search.py0get docs/extracts relevant to the query, from vecdbSTRING
HIGHexamples/docqa/chat-search-filter.py0get docs/extracts relevant to the query, from vecdbSTRING
HIGHexamples/chainlit/chat-search-rag.py0no extracts found! you can try doing a web search with the `relevant_search_extracts` tool/function-call.STRING
HIGHexamples/docqa/chat_search.py0no extracts found! you can try doing a web search with the `relevant_search_extracts` tool/function-call.STRING
HIGHexamples/docqa/chat-search-filter.py0no extracts found! you can try doing a web search with the `relevant_search_extracts` tool/function-call.STRING
HIGHexamples/chainlit/chat-search-rag.py0get docs/extracts relevant to the query, from a web searchSTRING
HIGHexamples/docqa/chat_search.py0get docs/extracts relevant to the query, from a web searchSTRING
HIGHexamples/docqa/chat-search-filter.py0get docs/extracts relevant to the query, from a web searchSTRING
78 more matches not shown…
Hyper-Verbose Identifiers598 hits · 554 pts
SeverityFileLineSnippetContext
LOW…ugins/langroid/skills/patterns/mcp-tool-integration.md32async def setup_agent_with_all_tools():CODE
LOWtests/conftest.py83def pytest_runtest_makereport(item, call):STRING
LOWtests/conftest.py147def pytest_collection_modifyitems(config, items):STRING
LOWtests/main/test_qdrant_lock_release.py13def test_qdrant_explicit_close():CODE
LOWtests/main/test_qdrant_lock_release.py43def test_qdrant_context_manager():CODE
LOWtests/main/test_qdrant_lock_release.py67def test_qdrant_context_manager_with_exception():CODE
LOWtests/main/test_qdrant_lock_release.py94def test_qdrant_multiple_sequential_operations():CODE
LOWtests/main/test_qdrant_lock_release.py115def test_qdrant_no_close_creates_new_directory():CODE
LOWtests/main/test_docx_parser.py40def test_markitdown_docx_parser():CODE
LOWtests/main/test_string_search.py46def test_return_correct_number_of_matches(STRING
LOWtests/main/test_string_search.py65def test_find_match_with_surrounding_words(STRING
LOWtests/main/test_string_search.py93def test_preprocess_lowercase():STRING
LOWtests/main/test_string_search.py98def test_preprocess_remove_punctuation():STRING
LOWtests/main/test_string_search.py104def test_preprocess_remove_stopwords():STRING
LOWtests/main/test_string_search.py113def test_preprocess_lemmatization():STRING
LOWtests/main/test_doc_chat_relevance.py175def test_doc_chat_rerank_diversity(test_settings: Settings, vecdb):CODE
LOWtests/main/test_doc_chat_relevance.py213def test_doc_chat_rerank_periphery(test_settings: Settings, vecdb):CODE
LOWtests/main/test_tool_origin_taint.py56def test_to_chatdocument_user_string_is_tainted():CODE
LOWtests/main/test_tool_origin_taint.py62def test_agent_authored_string_not_tainted():CODE
LOWtests/main/test_tool_origin_taint.py68def test_agent_response_not_tainted():CODE
LOWtests/main/test_tool_origin_taint.py73def test_create_user_response_is_tainted():CODE
LOWtests/main/test_tool_origin_taint.py78def test_interactive_user_response_is_tainted():CODE
LOWtests/main/test_tool_origin_taint.py86def test_system_user_response_not_tainted():CODE
LOWtests/main/test_tool_origin_taint.py95def test_task_init_user_string_is_tainted():CODE
LOWtests/main/test_tool_origin_taint.py104def test_root_task_user_chatdocument_input_is_tainted():CODE
LOWtests/main/test_tool_origin_taint.py124def test_deepcopy_propagates_taint():CODE
LOWtests/main/test_tool_origin_taint.py132def test_donepass_repackage_propagates_taint():CODE
LOWtests/main/test_tool_origin_taint.py146def test_donepass_repackage_of_llm_message_not_tainted():CODE
LOWtests/main/test_tool_origin_taint.py177def test_filter_vetoes_tainted_handoff():CODE
LOWtests/main/test_tool_origin_taint.py187def test_tainted_handoff_does_not_dispatch_handle_only_tool():CODE
LOWtests/main/test_multi_agent_complex_async.py40async def test_agents_with_recipient(CODE
LOWtests/main/test_md_parser.py74def test_parse_markdown_headings(sample_markdown, markdown_sections):CODE
LOWtests/main/test_md_parser.py141def test_no_headers_only_paragraphs():CODE
LOWtests/main/test_md_parser.py152def test_headers_with_no_content():STRING
LOWtests/main/test_md_parser.py167def test_header_with_inline_formatting():STRING
LOWtests/main/test_md_parser.py176def test_lists_and_code_blocks():STRING
LOWtests/main/test_md_parser.py201def test_multiple_same_level_headers():STRING
LOWtests/main/test_md_parser.py216def test_header_skipping_levels():STRING
LOWtests/main/test_md_parser.py385def test_chunking_word_set_consistency(rollup: bool):STRING
LOWtests/main/test_md_parser.py470def test_degenerate_markdown_parsing_and_chunking(STRING
LOWtests/main/test_md_parser.py625def test_recursive_chunk_enhanced():STRING
LOWtests/main/test_tool_handler.py304 def test_agent_response_with_chat_document(self):CODE
LOWtests/main/test_tool_handler.py340 def test_agent_response_agent_only(self):CODE
LOWtests/main/test_tool_handler.py355 def test_agent_response_chat_doc_only(self):CODE
LOWtests/main/test_tool_handler.py370 def test_agent_response_class_annotations(self):CODE
LOWtests/main/test_tool_handler.py208 def test_handle_agent_chat_doc(self):CODE
LOWtests/main/test_tool_handler.py220 def test_handle_chat_doc_agent(self):CODE
LOWtests/main/test_tool_handler.py230 def test_handle_no_annotations(self):CODE
LOWtests/main/test_tool_handler.py242 def test_handle_no_annotations_agent(self):CODE
LOWtests/main/test_tool_handler.py253 def test_handle_no_annotations_both(self):CODE
LOWtests/main/test_tool_handler.py265 def test_handle_no_annotations_both_reversed(self):CODE
LOWtests/main/test_tool_handler.py275 def test_backward_compatibility(self):CODE
LOWtests/main/test_tool_handler.py287 def test_agent_response_with_tool_message(self):CODE
LOWtests/main/test_tool_handler.py323 def test_agent_response_no_annotations(self):CODE
LOWtests/main/test_tool_handler.py390 def test_agent_response_class_annotations_reversed(self):CODE
LOWtests/main/test_concurrent_doc_chat_qdrant.py26def test_doc_chat_concurrent_local_qdrant(local_qdrant_config):CODE
LOWtests/main/test_task_inf_loop.py119def test_task_alternating_no_answer():CODE
LOWtests/main/test_quiet_mode.py28def test_quiet_mode_with_exception():CODE
LOWtests/main/test_parsing_citations.py19def test_invalid_markdown_citations(input_str: str, expected: list[str]) -> None:CODE
LOWtests/main/test_multi_agent.py185def test_multi_agent_directed(test_settings: Settings):STRING
538 more matches not shown…
Self-Referential Comments113 hits · 309 pts
SeverityFileLineSnippetContext
MEDIUMtests/main/test_md_parser.py325 # Create a long text consisting of 200 repeated tokens ("word")STRING
MEDIUMtests/main/test_md_parser.py391 # Define a header and content.STRING
MEDIUMtests/main/test_md_parser.py397 # Create a sample Markdown document with a header and content.STRING
MEDIUMtests/main/test_tool_handler.py309 # Create a tool messageCOMMENT
MEDIUMtests/main/test_tool_handler.py312 # Create a ChatDocument with the tool messageCOMMENT
MEDIUMtests/main/test_tool_handler.py345 # Create a tool messageCOMMENT
MEDIUMtests/main/test_tool_handler.py360 # Create a tool messageCOMMENT
MEDIUMtests/main/test_tool_handler.py378 # Create a tool messageCOMMENT
MEDIUMtests/main/test_tool_handler.py292 # Create a tool messageCOMMENT
MEDIUMtests/main/test_tool_handler.py328 # Create a tool messageCOMMENT
MEDIUMtests/main/test_tool_handler.py398 # Create a tool messageCOMMENT
MEDIUMtests/main/test_task.py1009 # Create a mock LLM that always responds with a tool in JSON formatCOMMENT
MEDIUMtests/main/test_task.py1079 # Create an agentCOMMENT
MEDIUMtests/main/test_llm.py631 # Create a FileAttachment from the PDF fileCOMMENT
MEDIUMtests/main/test_llm.py677 # Create a FileAttachment from the PDF fileCOMMENT
MEDIUMtests/main/test_llm.py683 # Create a FileAttachment from the PDF fileCOMMENT
MEDIUMtests/main/test_chat_agent.py224 # Create a FileAttachment from the PDF fileSTRING
MEDIUMtests/main/test_mcp_tools.py947 # Create a mock server that returns image contentCOMMENT
MEDIUMtests/main/test_mcp_tools.py966 # Create a mock agentCOMMENT
MEDIUMtests/main/test_mcp_tools.py995 # Create a mock CallToolResult with text and text resourceCOMMENT
MEDIUMtests/main/test_mcp_tools.py1041 # Create a mock CallToolResult with text and blob resourceCOMMENT
MEDIUMtests/main/test_mcp_tools.py1169 # Create a real MCP serverCOMMENT
MEDIUMtests/main/test_mcp_tools.py1181 # Create a Tool with the problematic schemaCOMMENT
MEDIUMtests/main/test_mcp_tools.py1238 # Create a real MCP serverCOMMENT
MEDIUMtests/main/test_openai_params_subclass.py39 # Create an instance - note we can't pass custom fields to constructorCOMMENT
MEDIUMtests/main/test_openai_params_subclass.py68 # Create an instance with custom fieldsCOMMENT
MEDIUMtests/main/test_tool_messages_async.py108# Define the range of values each variable can haveCOMMENT
MEDIUMtests/main/test_table_chat_agent.py36 # Create a list of statesSTRING
MEDIUMtests/main/test_table_chat_agent.py166 # Create a simple dataframe with data that needs cleaningSTRING
MEDIUMtests/main/test_prep_llm_message.py31 # Create a mock parser that counts tokens as characters for simplicityCOMMENT
MEDIUMtests/main/test_prep_llm_message.py44 # Create a mock LLM that returns a fixed context lengthCOMMENT
MEDIUMtests/main/test_prep_llm_message.py135 # Create a mock parser that counts tokens as characters for simplicityCOMMENT
MEDIUMtests/main/test_prep_llm_message.py148 # Create a mock LLM that returns a fixed context lengthCOMMENT
MEDIUMtests/main/test_retriever_agent.py23 # Create a list of statesCOMMENT
MEDIUMtests/main/test_stateless_tool_messages.py53# Define the range of values each variable can haveSTRING
MEDIUMtests/main/test_llm_async.py184 # Create a FileAttachment from the PDF fileCOMMENT
MEDIUMtests/main/test_llm_async.py232 # Create a FileAttachment from the PDF fileCOMMENT
MEDIUMtests/main/test_llm_async.py238 # Create a FileAttachment from the PDF fileCOMMENT
MEDIUMtests/main/test_llm_async.py283 # Create the LLM instanceSTRING
MEDIUMtests/main/test_task_optional_logger.py14 # Create a simple mock agentCOMMENT
MEDIUMtests/main/test_task_optional_logger.py46 # Create a simple mock agentCOMMENT
MEDIUMtests/main/test_task_optional_logger.py65 # Create a simple mock agentCOMMENT
MEDIUMtests/main/test_task_optional_logger.py77 # Create a test messageCOMMENT
MEDIUMtests/main/test_task_tool.py56 # Create main task that stops after handling the task_toolSTRING
MEDIUMtests/main/test_task_tool.py186 # Create a main agent with multiple tools availableSTRING
MEDIUMtests/main/test_task_tool.py276 # Create a main agent that delegates with no toolsSTRING
MEDIUMtests/main/test_pydantic_utils.py21 # Create an instance of TestModel with nested DetailsModelCOMMENT
MEDIUMtests/main/test_html_logger.py40 # Create a user messageCOMMENT
MEDIUMtests/main/test_tool_messages.py157# Define the range of values each variable can haveSTRING
MEDIUMtests/main/test_tool_messages.py2155 # Create a ChatDocument containing ToolB (which only AgentB knows about)COMMENT
MEDIUMtests/main/test_file_tools.py164 # Create a test fileSTRING
MEDIUMtests/main/test_global_settings.py127 # Define a temporary override that forces quiet=True.COMMENT
MEDIUMtests/main/test_token_usage.py35# Define the configurationsCOMMENT
MEDIUMtests/main/sql_chat/test_sql_chat_agent.py56 # Create an in-memory SQLite databaseCOMMENT
MEDIUMtests/extras/test_csv_kg_chat.py14# Create a dummy DataFrameCOMMENT
MEDIUMtests/extras/test_csv_kg_chat.py43 # Create a mock PandasToKGTool objectCOMMENT
MEDIUMexamples/langdb/langdb_chat_agent_tool.py72 # Create a LangDB model configurationSTRING
MEDIUMexamples/langdb/langdb_custom_headers.py23 # Create a LangDB model configurationCOMMENT
MEDIUMexamples/langdb/langdb_custom_headers.py34 # Create the modelCOMMENT
MEDIUMexamples/langdb/langdb_chat_agent_docs.py77 # Create a LangDB model configurationSTRING
53 more matches not shown…
Unused Imports236 hits · 224 pts
SeverityFileLineSnippetContext
LOWtests/main/test_openai_http_client.py16CODE
LOWtests/main/test_rich_file_logger.py1CODE
LOWexamples/multi-agent-debate/chainlit_utils.py6CODE
LOWexamples/basic/fn-call-local-simple.py28CODE
LOWexamples/basic/planner-workflow-spawn.py31CODE
LOWexamples/mcp/claude-code-mcp-single.py23CODE
LOWlangroid/__init__.py5CODE
LOWlangroid/__init__.py6CODE
LOWlangroid/__init__.py8CODE
LOWlangroid/__init__.py9CODE
LOWlangroid/__init__.py10CODE
LOWlangroid/__init__.py12CODE
LOWlangroid/__init__.py13CODE
LOWlangroid/__init__.py15CODE
LOWlangroid/__init__.py16CODE
LOWlangroid/__init__.py18CODE
LOWlangroid/__init__.py18CODE
LOWlangroid/__init__.py23CODE
LOWlangroid/__init__.py23CODE
LOWlangroid/__init__.py23CODE
LOWlangroid/__init__.py29CODE
LOWlangroid/__init__.py29CODE
LOWlangroid/__init__.py29CODE
LOWlangroid/__init__.py35CODE
LOWlangroid/__init__.py39CODE
LOWlangroid/__init__.py39CODE
LOWlangroid/__init__.py44CODE
LOWlangroid/__init__.py44CODE
LOWlangroid/__init__.py47CODE
LOWlangroid/__init__.py47CODE
LOWlangroid/__init__.py47CODE
LOWlangroid/__init__.py53CODE
LOWlangroid/__init__.py54CODE
LOWlangroid/embedding_models/__init__.py1CODE
LOWlangroid/embedding_models/__init__.py2CODE
LOWlangroid/embedding_models/__init__.py3CODE
LOWlangroid/embedding_models/__init__.py5CODE
LOWlangroid/embedding_models/__init__.py5CODE
LOWlangroid/embedding_models/__init__.py9CODE
LOWlangroid/embedding_models/__init__.py9CODE
LOWlangroid/embedding_models/__init__.py9CODE
LOWlangroid/embedding_models/__init__.py9CODE
LOWlangroid/embedding_models/__init__.py9CODE
LOWlangroid/embedding_models/__init__.py9CODE
LOWlangroid/embedding_models/__init__.py9CODE
LOWlangroid/embedding_models/__init__.py9CODE
LOWlangroid/embedding_models/__init__.py9CODE
LOWlangroid/embedding_models/__init__.py20CODE
LOWlangroid/embedding_models/__init__.py20CODE
LOWlangroid/language_models/__init__.py1CODE
LOWlangroid/language_models/__init__.py2CODE
LOWlangroid/language_models/__init__.py3CODE
LOWlangroid/language_models/__init__.py4CODE
LOWlangroid/language_models/__init__.py5CODE
LOWlangroid/language_models/__init__.py6CODE
LOWlangroid/language_models/__init__.py8CODE
LOWlangroid/language_models/__init__.py8CODE
LOWlangroid/language_models/__init__.py8CODE
LOWlangroid/language_models/__init__.py8CODE
LOWlangroid/language_models/__init__.py8CODE
176 more matches not shown…
Excessive Try-Catch Wrapping152 hits · 143 pts
SeverityFileLineSnippetContext
LOWplugins/langroid/skills/patterns/run-batch-tasks.md160 except Exception as e:CODE
LOW…groid/skills/patterns/agent-tool-handler-with-state.md67 except Exception as e:CODE
LOW…groid/skills/patterns/agent-tool-handler-with-state.md127 except Exception as e:CODE
LOWtests/conftest.py190 except Exception:CODE
LOWtests/main/test_quiet_mode.py35 except Exception:CODE
LOWtests/main/test_concurrent_rag_simple.py281 except Exception as e:CODE
LOWtests/main/test_concurrent_rag_simple.py289 except Exception as e:CODE
LOWtests/main/test_arangodb_chat_agent.py30 except Exception:CODE
LOWtests/main/test_arangodb_chat_agent.py150 except Exception as e:CODE
MEDIUMtests/main/test_arangodb_chat_agent.py151 print(f"Error inserting data: {e}")CODE
LOWtests/main/test_openai_http_client.py265 except Exception as e:CODE
LOWtests/main/test_openai_http_client.py306 except Exception as e:CODE
LOWtests/main/test_openai_http_client.py333 except Exception as e:CODE
LOWtests/main/test_openai_http_client.py354 except Exception:CODE
LOWtests/main/test_mcp_tools.py1122 except Exception:CODE
LOWtests/main/test_mcp_tools.py838 except Exception as e:STRING
LOWtests/main/test_web_search_tools.py78 except Exception as e:CODE
LOWtests/main/test_vector_stores.py491 except Exception as exc:CODE
LOWtests/main/test_openai_gpt_client_cache.py284 except Exception as e:CODE
LOWtests/main/test_task_tool.py261 except Exception:STRING
LOWtests/main/test_neo4j_chat_agent.py28 except Exception:CODE
LOWtests/main/test_neo4j_chat_agent.py64 except Exception as e:CODE
LOWtests/main/test_neo4j_chat_agent.py91 except Exception as e:CODE
LOWtests/main/test_global_settings.py35 except Exception as e:CODE
LOWtests/main/mcp/weather-server-python/weather.py22 except Exception:CODE
LOWtests/main/mcp/weather-server-python/weather.py44 except Exception:CODE
LOWdocs/notes/portkey.md277 except Exception:CODE
LOWexamples/portkey/portkey_multi_provider.py81 except Exception as e:CODE
LOWexamples/portkey/portkey_multi_provider.py144 except Exception as e:CODE
LOWexamples/portkey/portkey_multi_provider.py174 except Exception as e:CODE
LOWexamples/portkey/portkey_multi_provider.py184 except Exception as e:CODE
LOWexamples/portkey/portkey_multi_provider.py194 except Exception as e:CODE
LOWexamples/portkey/portkey_advanced_features.py166 except Exception as e:CODE
LOWexamples/portkey/portkey_advanced_features.py203 except Exception as e:CODE
LOWexamples/portkey/portkey_basic_chat.py58 except Exception as e:CODE
LOWexamples/portkey/portkey_basic_chat.py105 except Exception as e:CODE
LOWexamples/chainlit/dependency_chatbot.py194 except Exception as e:STRING
MEDIUMexamples/docqa/crawl4ai_examples.py95 print("Error: Failed to parse the extracted content as JSON.")CODE
MEDIUMexamples/docqa/crawl4ai_examples.py281 print(f"Error parsing LLM output JSON: {e}")CODE
LOWexamples/multi-agent-debate/models.py65 except Exception as e:CODE
LOWexamples/multi-agent-debate/chainlit_utils.py173 except Exception as e:CODE
LOWexamples/basic/done_sequences_example.py47 except Exception as e:CODE
MEDIUMexamples/basic/done_sequences_example.py43def handle(self) -> str:CODE
LOWexamples/basic/python-code-exec-tool.py47 except Exception as e:CODE
MEDIUMexamples/basic/python-code-exec-tool.py48 print(f"Error: {str(e)}")CODE
LOWexamples/basic/chat-persist.py103 except Exception:CODE
LOWexamples/mcp/claude-code-mcp-single.py102 except Exception:CODE
LOWexamples/kg-chat/dependency_chatbot.py202 except Exception as e:STRING
LOWlangroid/embedding_models/base.py35 except Exception:CODE
LOWlangroid/language_models/utils.py96 except Exception as e:CODE
LOWlangroid/language_models/utils.py178 except Exception as e:CODE
LOWlangroid/language_models/client_cache.py376 except Exception:CODE
LOWlangroid/language_models/openai_gpt.py408 except Exception:CODE
LOWlangroid/language_models/openai_gpt.py1352 except Exception as e:CODE
LOWlangroid/language_models/openai_gpt.py1431 except Exception as e:CODE
LOWlangroid/language_models/openai_gpt.py2104 except Exception as e:STRING
LOWlangroid/language_models/openai_gpt.py138 except Exception as e:STRING
LOWlangroid/language_models/openai_gpt.py1712 except Exception as e:STRING
LOWlangroid/language_models/openai_gpt.py1732 except Exception as e:STRING
LOWlangroid/language_models/openai_gpt.py1795 except Exception as e:STRING
92 more matches not shown…
Decorative Section Separators31 hits · 112 pts
SeverityFileLineSnippetContext
MEDIUMtests/main/test_tool_origin_taint.py47# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/main/test_tool_origin_taint.py49# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/main/test_tool_origin_taint.py119# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/main/test_tool_origin_taint.py121# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/main/test_tool_origin_taint.py160# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/main/test_tool_origin_taint.py163# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/main/test_md_parser.py548# ----------------------------------------------------------------STRING
MEDIUMtests/main/test_md_parser.py550# ----------------------------------------------------------------STRING
MEDIUMtests/main/test_handle_message_security.py54# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/main/test_handle_message_security.py56# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/main/test_handle_message_security.py89# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/main/test_handle_message_security.py91# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/main/test_handle_message_security.py120# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/main/test_handle_message_security.py122# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/main/test_pandas_utils.py87# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/main/test_pandas_utils.py97# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/main/test_minimax_provider.py25# ──────────────────────── Unit Tests ────────────────────────COMMENT
MEDIUMtests/main/test_minimax_provider.py269# ──────────────────────── Integration Tests ────────────────────────COMMENT
MEDIUMtests/main/sql_chat/test_sql_chat_security.py56# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/main/sql_chat/test_sql_chat_security.py58# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/main/sql_chat/test_sql_chat_security.py201# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/main/sql_chat/test_sql_chat_security.py203# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/main/sql_chat/test_sql_chat_security.py235# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/main/sql_chat/test_sql_chat_security.py238# ---------------------------------------------------------------------------COMMENT
MEDIUMlangroid/agent/batch.py337 # ----------------------------------------COMMENT
MEDIUMlangroid/agent/tools/mcp/fastmcp_client.py926# ==============================================================================COMMENT
MEDIUMlangroid/agent/tools/mcp/fastmcp_client.py930# ==============================================================================COMMENT
MEDIUMlangroid/parsing/md_parser.py210 # -------------------------------------------------COMMENT
MEDIUMlangroid/parsing/md_parser.py212 # -------------------------------------------------COMMENT
MEDIUMlangroid/parsing/md_parser.py282 # -------------------------------------------------COMMENT
MEDIUMlangroid/parsing/md_parser.py284 # -------------------------------------------------COMMENT
Docstring Block Structure21 hits · 105 pts
SeverityFileLineSnippetContext
HIGHexamples/multi-agent-debate/config.py51 Creates an LLM (Language Learning Model) configuration based on the selected model. This function uses the useSTRING
HIGHexamples/multi-agent-debate/models.py35Load and validate system messages from a JSON file. Reads the JSON file containing system messages, maps each entrySTRING
HIGHexamples/multi-agent-debate/utils.py141Prompt the user to select a debate topic and sets up the respective side. This function handles the user interactioSTRING
HIGHexamples/multi-agent-debate/chainlit_utils.py254 Prompt the user to select a debate topic and sets up the respective side. Args: system_messages (SystemSTRING
HIGHexamples/basic/drug-outcomes.py59 Extracts an integer from a string that contains a number. Args: x (str): The input string containing tSTRING
HIGHexamples/data-qa/sql-chat/sql_chat.py55 Create an empty descriptions JSON file for SQLAlchemy tables. This function inspects the database, generates aSTRING
HIGHissues/issue-919-llamacpp-embeddings.md131 Extract embedding vector from llama.cpp response. Handles multiple response formats: 1. Native /embedding:STRING
HIGHlangroid/embedding_models/models.py486 Extract embedding vector from llama.cpp response. Handles multiple response formats: 1. NativeSTRING
HIGHlangroid/utils/system.py191 Resolve ``user_path`` relative to ``base_dir`` and ensure the result stays within ``base_dir`` (a path-traversaSTRING
HIGHlangroid/utils/system.py263 Read the contents of a file. Args: path (str): The path to the file to be read. line_numbers (STRING
HIGHlangroid/agent/xml_tool_message.py63 Extracts field values from an XML-formatted string. Args: formatted_string (str): The XML-STRING
HIGHlangroid/agent/done_sequence_parser.py22Parse a string pattern or return existing DoneSequence unchanged. Args: sequence: Either a DoneSequence objSTRING
HIGHlangroid/agent/done_sequence_parser.py48Parse a string pattern into a list of AgentEvent objects. Pattern format: - Single letter codes: T, A, L, USTRING
HIGHlangroid/agent/done_sequence_parser.py88Parse a single event token into an AgentEvent. Args: token: Single event token (e.g., "T", "T[calc]", "C[quSTRING
HIGHlangroid/agent/special/neo4j/neo4j_chat_agent.py389 Retrieves the schema of a Neo4j graph database. Args: msg (GraphSchemaTool): An instance oSTRING
HIGHlangroid/vector_store/lancedb.py144 NOTE: NOT USED, but leaving it here as it may be useful. Create a subclass of LanceModel with fields: STRING
HIGHlangroid/parsing/repo_loader.py212 Get the file type of a file name. Args: name: name of file, can be "a", "a.b", or ".b" STRING
HIGHlangroid/parsing/url_loader.py182Create a crawler instance based on configuration type. Args: config: Configuration for the crawler STRING
HIGHlangroid/parsing/url_loader.py396Crawl the given URLs using Exa SDK. Args: urls: List of URLs to crawl Returns: STRING
HIGHlangroid/parsing/table_loader.py8 Reads tabular data from a file or URL and returns a pandas DataFrame. The separator is auto-detected if not speSTRING
HIGHlangroid/parsing/urls.py20 Fetch content from the given URL and save it to a temporary local file. Args: url (str): The URL of thSTRING
Modern Structural Boilerplate106 hits · 103 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py11logger = logging.getLogger(__name__)CODE
LOWtests/extras/test_doc_chat_agent_llamacpp.py129logger = logging.getLogger(__name__)STRING
LOWexamples/chainlit/chat-search-rag.py46logger = logging.getLogger(__name__)CODE
LOWexamples/chainlit/chat-search.py35logger = logging.getLogger(__name__)CODE
LOWexamples/docqa/chat_search.py54logger = logging.getLogger(__name__)CODE
LOWexamples/multi-agent-debate/chainlit_utils.py12logger = logging.getLogger(__name__)CODE
LOWexamples/basic/multi-agent-medical.py41logger = logging.getLogger(__name__)CODE
LOWexamples/basic/chat-persist.py42logger = logging.getLogger(__name__)CODE
LOWexamples/basic/planner-workflow-spawn.py34logger = logging.getLogger(__name__)CODE
LOWexamples/basic/planner-workflow.py28logger = logging.getLogger(__name__)CODE
LOWexamples/basic/planner-workflow-simple.py37logger = logging.getLogger(__name__)CODE
LOWexamples/kg-chat/chat-arangodb.py52logger = logging.getLogger(__name__)CODE
LOWexamples/kg-chat/chat-arangodb-igvf.py46logger = logging.getLogger(__name__)CODE
LOWexamples/extract/pdf-json.py39logger = logging.getLogger(__name__)CODE
LOWexamples/extract/pdf-json-flex.py37logger = logging.getLogger(__name__)CODE
LOWexamples/extract/pdf-json-no-parse.py44logger = logging.getLogger(__name__)CODE
LOWexamples/data-qa/sql-chat/utils.py9logger = logging.getLogger(__name__)CODE
LOWexamples/data-qa/sql-chat/sql_chat.py48logger = logging.getLogger(__name__)CODE
LOWlangroid/__init__.py56__all__ = [CODE
LOWlangroid/embedding_models/__init__.py26__all__ = [CODE
LOWlangroid/language_models/__init__.py30__all__ = [CODE
LOWlangroid/language_models/azure_openai.py21logger = logging.getLogger(__name__)CODE
LOWlangroid/language_models/utils.py12logger = logging.getLogger(__name__)CODE
LOWlangroid/language_models/model_info.py7logger = logging.getLogger(__name__)CODE
LOWlangroid/language_models/base.py33logger = logging.getLogger(__name__)CODE
LOWlangroid/language_models/prompt_formatter/__init__.py9__all__ = [CODE
LOW…d/language_models/prompt_formatter/llama2_formatter.py8logger = logging.getLogger(__name__)CODE
LOW…groid/language_models/prompt_formatter/hf_formatter.py18logger = logging.getLogger(__name__)CODE
LOWlangroid/language_models/prompt_formatter/base.py8logger = logging.getLogger(__name__)CODE
LOWlangroid/utils/configuration.py70def update_global_settings(cfg: BaseSettings, keys: List[str]) -> None:CODE
LOWlangroid/utils/configuration.py85def set_global(key_vals: Settings) -> None:CODE
LOWlangroid/utils/configuration.py131def set_env(settings_instance: BaseSettings) -> None:CODE
LOWlangroid/utils/system.py15logger = logging.getLogger(__name__)CODE
LOWlangroid/utils/globals.py42 def set_values(cls: Type[T], **kwargs: Dict[str, Any]) -> None:CODE
LOWlangroid/utils/pydantic_utils.py22logger = logging.getLogger(__name__)CODE
LOWlangroid/utils/__init__.py10__all__ = [CODE
LOWlangroid/utils/types.py8logger = logging.getLogger(__name__)CODE
LOWlangroid/utils/git_utils.py12logger = logging.getLogger(__name__)CODE
LOWlangroid/utils/algorithms/__init__.py3__all__ = ["graph"]CODE
LOWlangroid/utils/output/citations.py6logger = logging.getLogger(__name__)CODE
LOWlangroid/utils/output/__init__.py12__all__ = [CODE
LOWlangroid/utils/output/status.py11logger = logging.getLogger(__name__)CODE
LOWlangroid/agent/task.py64logger = logging.getLogger(__name__)CODE
LOWlangroid/agent/task.py534 def _set_alive(self) -> None:CODE
LOWlangroid/agent/task.py2267 def set_color_log(self, enable: bool = True) -> None:CODE
LOWlangroid/agent/task.py1407 def _update_no_answer_vars(self, result: ChatDocument) -> None:STRING
LOWlangroid/agent/__init__.py22__all__ = [CODE
LOWlangroid/agent/openai_assistant.py33logger = logging.getLogger(__name__)CODE
LOWlangroid/agent/openai_assistant.py302 def _update_messages_hash(self, msg: Message | LLMMessage) -> None:CODE
LOWlangroid/agent/openai_assistant.py574 def set_system_message(self, msg: str) -> None:CODE
LOWlangroid/agent/base.py73logger = logging.getLogger(__name__)CODE
LOWlangroid/agent/base.py255 def update_dialog(self, prompt: str, output: str) -> None:CODE
LOWlangroid/agent/chat_agent.py63logger = logging.getLogger(__name__)CODE
LOWlangroid/agent/chat_agent.py149 def _set_fn_or_tools(self) -> None:CODE
LOWlangroid/agent/chat_agent.py381 def set_system_message(self, msg: str) -> None:CODE
LOWlangroid/agent/chat_agent.py387 def set_user_message(self, msg: str) -> None:CODE
LOWlangroid/agent/chat_agent.py445 def update_history(self, message: str, response: str) -> None:CODE
LOWlangroid/agent/chat_agent.py593 def update_last_message(self, message: str, role: str = Role.USER) -> None:CODE
LOWlangroid/agent/chat_agent.py850 def _update_tool_instructions(self) -> None:STRING
LOWlangroid/agent/tools/__init__.py20__all__ = [CODE
46 more matches not shown…
Deep Nesting101 hits · 94 pts
SeverityFileLineSnippetContext
LOWtests/main/test_task_tool.py182CODE
LOWtests/main/test_tool_messages.py857CODE
LOWexamples/docqa/crawl4ai_examples.py405CODE
LOWexamples/docqa/chat_search.py107CODE
LOWexamples/docqa/rag-concurrent.py132CODE
LOW…amples/basic/multi-agent-search-critic-no-orch/main.py56CODE
LOW…amples/basic/multi-agent-search-critic-no-orch/main.py93CODE
LOWexamples/kg-chat/csv-chat.py48CODE
LOWlangroid/embedding_models/remote_embeds.py71CODE
LOWlangroid/embedding_models/remote_embeds.py84CODE
LOWlangroid/embedding_models/models.py607CODE
LOWlangroid/embedding_models/models.py118CODE
LOWlangroid/embedding_models/models.py483CODE
LOWlangroid/embedding_models/base.py40CODE
LOWlangroid/language_models/client_cache.py360CODE
LOWlangroid/language_models/base.py294CODE
LOWlangroid/language_models/base.py419CODE
LOWlangroid/language_models/openai_gpt.py421CODE
LOWlangroid/language_models/openai_gpt.py974CODE
LOWlangroid/language_models/openai_gpt.py1139CODE
LOWlangroid/language_models/openai_gpt.py1293CODE
LOWlangroid/language_models/openai_gpt.py2121CODE
LOWlangroid/utils/logging.py200CODE
LOWlangroid/utils/system.py218CODE
LOWlangroid/utils/pydantic_utils.py104CODE
LOWlangroid/utils/pydantic_utils.py165CODE
LOWlangroid/utils/types.py13CODE
LOWlangroid/utils/types.py75CODE
LOWlangroid/utils/html_logger.py516CODE
LOWlangroid/utils/git_utils.py42CODE
LOWlangroid/utils/algorithms/graph.py11CODE
LOWlangroid/utils/algorithms/graph.py53CODE
LOWlangroid/utils/output/citations.py49CODE
LOWlangroid/agent/task.py610CODE
LOWlangroid/agent/task.py692CODE
LOWlangroid/agent/task.py789CODE
LOWlangroid/agent/task.py957CODE
LOWlangroid/agent/task.py1754CODE
LOWlangroid/agent/task.py2339CODE
LOWlangroid/agent/task.py2386CODE
LOWlangroid/agent/xml_tool_message.py62CODE
LOWlangroid/agent/xml_tool_message.py190CODE
LOWlangroid/agent/xml_tool_message.py342CODE
LOWlangroid/agent/xml_tool_message.py390CODE
LOWlangroid/agent/xml_tool_message.py91CODE
LOWlangroid/agent/xml_tool_message.py203CODE
LOWlangroid/agent/xml_tool_message.py353CODE
LOWlangroid/agent/batch.py71CODE
LOWlangroid/agent/batch.py184CODE
LOWlangroid/agent/batch.py214CODE
LOWlangroid/agent/chat_document.py253CODE
LOWlangroid/agent/chat_document.py441CODE
LOWlangroid/agent/tool_message.py35CODE
LOWlangroid/agent/tool_message.py298CODE
LOWlangroid/agent/done_sequence_parser.py85CODE
LOWlangroid/agent/base.py264CODE
LOWlangroid/agent/base.py325CODE
LOWlangroid/agent/base.py766CODE
LOWlangroid/agent/base.py1975CODE
LOWlangroid/agent/base.py2034CODE
41 more matches not shown…
Modern AI Meta-Vocabulary41 hits · 82 pts
SeverityFileLineSnippetContext
MEDIUMtests/main/test_vector_stores.py432 # Test context window retrievalCOMMENT
MEDIUMtests/main/test_vector_stores.py570 # Test context window retrievalCOMMENT
MEDIUMtests/main/test_vector_stores.py575 # single window. The third Giraffe-match context window will not overlap withCOMMENT
MEDIUMdocs/FAQ.md309## How can I improve `DocChatAgent` (RAG) latency?STRING
MEDIUMdocs/blog/posts/langroid-lancedb.md134## Retrieval Augmented Generation (RAG) and Vector DatabasesSTRING
MEDIUMdocs/blog/posts/multi-agent-debate.md60#### RAG Q&A Agent:COMMENT
MEDIUMdocs/notes/chunking.md113 # Configure context windowCOMMENT
MEDIUMdocs/notes/llama-cpp-embeddings.md44 dims=768, # Match the dimensions of your embedding modelCODE
MEDIUMdocs/examples/guide.md55### Document-chat examples, or RAG (Retrieval Augmented Generation)COMMENT
MEDIUMdocs/quick-start/two-agent-chat-num.md114## Logs of multi-agent interactionsSTRING
MEDIUMdocs/quick-start/chat-agent-tool.md83 # Compiled to few-shot examples sent along with the tool instructions.STRING
MEDIUMdocs/tutorials/langroid-tour.md125## Chat with a document (RAG)STRING
MEDIUMexamples/langdb/README.md16### 1. LangDB Chat Agent with Document RAG (`langdb_chat_agent_docs.py`)COMMENT
MEDIUMexamples/chainlit/.chainlit/config.toml65# Hide the chain of thought details from the user in the UI.COMMENT
MEDIUMexamples/docqa/rag-local-simple.py60 # using SentenceTransformers/BAAI/bge-large-en-v1.5 embedding modelCOMMENT
MEDIUMexamples/docqa/chat.py128 dims=768, # Change this to match the dimensions of your embedding modelCODE
MEDIUMexamples/docqa/chat-multi-extract-local.py245 # (2) RAG AGENT: try to answer a given question based on documentsSTRING
MEDIUMexamples/docqa/chat-multi-extract-local.py277 # from the RAG agentSTRING
MEDIUMexamples/docqa/chat-multi-extract-local.py329 # Questions -> Answers using RAGSTRING
MEDIUMexamples/basic/fn-call-local-numerical.py83 # Used to provide few-shot examples in the system promptCOMMENT
MEDIUMexamples/basic/fn-call-local-numerical.py207 # and few-shot examples into the system messageSTRING
MEDIUMexamples/basic/fn-call-local-simple.py73 # Used to provide few-shot examples in the system promptCOMMENT
MEDIUMexamples/basic/fn-call-local-simple.py138 # and few-shot examples (specified in the tool defn above) into the system messageSTRING
MEDIUMexamples/basic/1-agent-3-tools.py27 # Examples that will be compiled into few-shot examples for the LLM.COMMENT
MEDIUMexamples/basic/text-to-structured.py85 # Used to provide few-shot examples in the system promptSTRING
MEDIUMexamples/basic/text-to-structured.py133 # and few-shot examples (specified in the tool defn above) into the system messageSTRING
MEDIUMexamples/basic/1-agent-3-tools-address-user.py30 # Examples that will be compiled into few-shot examples for the LLM.COMMENT
MEDIUM.chainlit/config.toml65# Hide the chain of thought details from the user in the UI.COMMENT
MEDIUMissues/issue-919-llamacpp-embeddings.md223 dims=768, # Match your embedding model dimensionsCODE
MEDIUMissues/issue-919-llamacpp-embeddings.md238# For dedicated embedding model (RECOMMENDED)COMMENT
MEDIUMissues/20251010-concurrent-rag-status.md1# Concurrent DocChat RAG – Current Status (2025-10-10)COMMENT
MEDIUMlangroid/mytypes.py52 window_ids: List[str] = [] # for RAG: ids of chunks around this oneCODE
MEDIUMlangroid/language_models/model_info.py163 max_cot_tokens: int = 0 # max chain of thought (thinking) tokens where applicableCODE
MEDIUMlangroid/agent/chat_document.py61 # multi-agent handoff (a Task then relabels sender -> USER). Lets handle-onlyCOMMENT
MEDIUMlangroid/agent/base.py1364 # across a multi-agent handoff), not raw user input -- safe toSTRING
MEDIUMlangroid/agent/base.py1651 # check whether there are multiple orchestration-tools (e.g. DoneTool etc),STRING
MEDIUMlangroid/agent/base.py1706 # Cannot support multi-tool results containing orchestration strings!STRING
MEDIUMlangroid/agent/base.py1752 # agent's or, in multi-agent setups, another agent's), not by raw userSTRING
MEDIUMlangroid/agent/special/doc_chat_agent.py230 rerank_after_adding_context: bool = True # rerank after adding context window?STRING
MEDIUMlangroid/agent/special/doc_chat_agent.py1301 # Do not add context window when there are other fields besides justSTRING
MEDIUMlangroid/agent/special/lance_rag/query_planner_agent.py195 # since this Agent seeks feedback only after receiving RAG answer.COMMENT
Redundant / Tautological Comments45 hits · 54 pts
SeverityFileLineSnippetContext
LOWtests/main/test_task.py1118 # Set caller to simulate subtask scenarioCOMMENT
LOWtests/main/test_openai_http_client.py14# Check if httpx is availableCOMMENT
LOWtests/main/test_git_utils.py92 # Check if the file was actually committedCOMMENT
LOWtests/main/test_task_optional_logger.py26 # Check if loggers were createdCOMMENT
LOWtests/main/test_task_optional_logger.py58 # Check if loggers were NOT createdCOMMENT
LOWtests/main/test_task_tool.py248 # Check if current message is from TaskToolSTRING
LOWtests/main/test_pdf_utils.py9 # Check if the pages are split correctlyCOMMENT
LOWtests/main/test_file_tools.py71 # Check if the file was createdSTRING
LOWtests/main/test_file_tools.py75 # Check if the content was written correctlySTRING
LOWtests/main/test_file_tools.py79 # Check if the file was committed to the git repoSTRING
LOWtests/main/test_file_tools.py118 # Check if all files are in the repoSTRING
LOWtests/main/test_file_tools.py213 # Check if each line of content is in the result, ignoring line numbersSTRING
LOWexamples/chainlit/dependency_chatbot.py133 # Check if node has been added beforeSTRING
LOWexamples/docqa/rag-concurrent.py377 # Display resultsCOMMENT
LOWexamples/kg-chat/dependency_chatbot.py141 # Check if node has been added beforeSTRING
LOWlangroid/embedding_models/models.py187 # Check if using LangDBCOMMENT
LOWlangroid/embedding_models/models.py510 # Check if it's [floats]COMMENT
LOWlangroid/embedding_models/models.py534 # Check if it's [floats]COMMENT
LOWlangroid/embedding_models/models.py538 # Check if it's [[floats]]COMMENT
LOWlangroid/language_models/utils.py75 # Increment retriesCOMMENT
LOWlangroid/language_models/utils.py78 # Check if max retries has been reachedCOMMENT
LOWlangroid/language_models/utils.py158 # Increment retriesCOMMENT
LOWlangroid/language_models/utils.py161 # Check if max retries has been reachedCOMMENT
LOWlangroid/language_models/client_cache.py368 # Check if close is a coroutine function (async)COMMENT
LOWlangroid/utils/pydantic_utils.py461 # Check if metadata_cols is emptyCOMMENT
LOWlangroid/utils/git_utils.py103 # Check if we're on the master branchCOMMENT
LOWlangroid/agent/task.py2009 # Check if task should be done if message contains a toolCOMMENT
LOWlangroid/agent/xml_tool_message.py128 # Check if this corresponds to a nested Pydantic modelCOMMENT
LOWlangroid/agent/batch.py464 # Check if the method is asyncCOMMENT
LOWlangroid/agent/chat_agent.py1184 # Check if tool class was attached to the exceptionSTRING
LOWlangroid/agent/chat_agent.py2124 # Check if callback accepts 'reasoning' param or **kwargsSTRING
LOWlangroid/agent/special/doc_chat_agent.py158 # Check if module exists in sys.pathSTRING
LOWlangroid/agent/special/table_chat_agent.py262 # Return the resultSTRING
LOWlangroid/agent/special/neo4j/neo4j_chat_agent.py259 # Check if query contains database/collection creation patternsSTRING
LOWlangroid/agent/special/arangodb/arangodb_agent.py231 # Check if any non-system collection has dataSTRING
LOWlangroid/vector_store/weaviatedb.py292 # Check if the name now meets the criteriaSTRING
LOWlangroid/parsing/md_parser.py75 # Check if we're toggling in/out of a fenced code blockCOMMENT
LOWlangroid/parsing/md_parser.py95 # Check if the line is a headingCOMMENT
LOWlangroid/parsing/md_parser.py369 # Check if this is a header-only node.COMMENT
LOWlangroid/parsing/md_parser.py437 # Check if this is a header node (content matches last item in path)COMMENT
LOWlangroid/parsing/md_parser.py471 # Check if the node is "heading-only" and has childrenCOMMENT
LOWlangroid/parsing/md_parser.py494 # Check if we can roll up everything (node + children) in a single chunkCOMMENT
LOWlangroid/parsing/urls.py77 # Check if the user wants to exit the loop.COMMENT
LOWlangroid/parsing/document_parser.py89 # Check if the MIME type is not a text typeCOMMENT
LOWlangroid/parsing/file_attachment.py112 # Check if it's a URLCOMMENT
Cross-Language Confusion8 hits · 45 pts
SeverityFileLineSnippetContext
HIGHtests/main/test_mcp_tools.py1831 # Optional[int] (anyOf including null) -> Union[int, None]COMMENT
HIGHtests/main/test_json.py101 ('{"key": null}', {"key": None}),CODE
HIGHtests/main/test_json.py120 "null": null,STRING
HIGHtests/main/test_json.py184 '{"key": undefined}', # JavaScript-style undefined (gets repaired)CODE
HIGHtests/main/test_json.py188 '{"key": null, "key2": }', # Trailing comma with no valueCODE
HIGHtests/extras/test_csv_kg_chat.py64 assert nodes_query_df.equals(df)CODE
HIGHlangroid/utils/html_logger.py434 if (savedState !== null) {{CODE
HIGHlangroid/utils/html_logger.py453 if (contentElement && toggleElement) {{CODE
Over-Commented Block33 hits · 33 pts
SeverityFileLineSnippetContext
LOWtests/main/test_md_parser.py681COMMENT
LOWtests/main/test_task_lineage_rewind.py161COMMENT
LOWtests/main/test_task_lineage_rewind.py321 )COMMENT
LOWtests/main/test_tool_messages.py1481 # Strict fallback disables the default arguments, but the LLMCOMMENT
LOWtests/main/test_pandas_utils.py81def test_block(expr, msg):COMMENT
LOWexamples/portkey/requirements.txt1# Requirements for Portkey examplesCOMMENT
LOWexamples/chainlit/.chainlit/config.toml61COMMENT
LOWexamples/chainlit/.chainlit/config.toml81COMMENT
LOWexamples/docqa/rag-local-simple.py41 )COMMENT
LOWexamples/summarize/summ.py41 # Create the llm config object.COMMENT
LOWexamples/basic/chat-local.py21# Notes:COMMENT
LOWexamples/basic/fn-call-local-simple.py101 timeout=45,COMMENT
LOWexamples/kg-chat/chat-arangodb.py181COMMENT
LOWexamples/kg-chat/chat-arangodb-igvf.py141 # You can have this in a loop with the user, like so:COMMENT
LOWscripts/fix-pydantic-imports.sh1#!/bin/bashCOMMENT
LOW.github/workflows/pytest.yml141 # - name: Restore uv cache COMMENT
LOW.github/workflows/pytest-subset.yml1name: Pytest subset (manual)COMMENT
LOW.chainlit/config.toml61COMMENT
LOW.chainlit/config.toml81COMMENT
LOWlangroid/language_models/openai_gpt.py481 # set the actual model name by stripping the "litellm/" prefixCOMMENT
LOWlangroid/language_models/openai_gpt.py2081 result = completion_call(**kwargs)COMMENT
LOWlangroid/agent/task.py1161COMMENT
LOWlangroid/agent/chat_document.py61 # multi-agent handoff (a Task then relabels sender -> USER). Lets handle-onlyCOMMENT
LOWlangroid/agent/chat_document.py81 cached: bool = FalseCOMMENT
LOWlangroid/agent/tool_message.py101 id: str = "" # placeholder for OpenAI-API tool_call_idCOMMENT
LOWlangroid/agent/base.py821 )COMMENT
LOWlangroid/agent/base.py901 source=e,COMMENT
LOWlangroid/agent/base.py1741 return str(xe)COMMENT
LOWlangroid/agent/base.py1881 try:COMMENT
LOWlangroid/agent/special/doc_chat_agent.py201 # and those will already be in stand-alone form, so in this modeCOMMENT
LOWlangroid/agent/special/doc_chat_agent.py1441COMMENT
LOWlangroid/agent/special/sql/sql_chat_agent.py121# query text (case-insensitive) as a defense-in-depth layer in addition to theCOMMENT
LOWlangroid/agent/special/sql/sql_chat_agent.py241COMMENT
Fake / Example Data26 hits · 30 pts
SeverityFileLineSnippetContext
LOWtests/main/test_mcp_tools.py411 recipient__="John Doe",CODE
LOWtests/main/test_mcp_tools.py418 assert msg.recipient__ == "John Doe"CODE
LOWtests/main/test_neo4j_chat_agent.py170 CREATE (p:Person {name: 'John Doe', age: 30})CODE
LOWtests/main/test_neo4j_chat_agent.py176 MATCH (p:Person {name: 'John Doe'})CODE
LOWtests/main/test_neo4j_chat_agent.py183 MATCH (p:Person {name: 'John Doe'})CODE
LOWtests/main/test_pydantic_utils.py23 name="John Doe", age=30, details=DetailsModel(height=180.5, weight=75.0)CODE
LOWtests/main/test_pydantic_utils.py28 assert result == {"name": "John Doe"}CODE
LOWtests/main/test_pydantic_utils.py32 assert result == {"name": "John Doe", "age": 30, "weight": 75.0}CODE
LOWtests/main/test_object_registry.py102 ObjectRegistry.registry["dummy_id"] = NoneCODE
LOWtests/main/test_object_registry.py103 # Ensure "dummy_id" is in the registry before cleanupCOMMENT
LOWtests/main/test_object_registry.py104 assert "dummy_id" in ObjectRegistry.registryCODE
LOWtests/main/test_object_registry.py107 # "dummy_id" should be removed post cleanupCOMMENT
LOWtests/main/test_object_registry.py108 assert "dummy_id" not in ObjectRegistry.registryCODE
LOWtests/main/test_xml_tool_message.py361 name="John Doe",STRING
LOWtests/main/test_xml_tool_message.py364 street="123 Main St", city="Anytown", country="USA"STRING
LOWtests/main/test_xml_tool_message.py371 name="Jane Doe",STRING
LOWtests/main/test_xml_tool_message.py402 name="Jane Doe",STRING
LOWtests/main/test_xml_tool_message.py410 name="John Doe",STRING
LOWtests/main/test_xml_tool_message.py412 address=Address(street="123 Main St", city="Anytown", country="USA"),STRING
LOWtests/main/test_xml_tool_message.py491 assert parsed.person.name == "John Doe"STRING
LOWtests/main/test_xml_tool_message.py494 assert parsed.person.address.street == "123 Main St"STRING
LOWtests/main/test_xml_tool_message.py562 name="Jane Doe",STRING
LOWexamples/chainlit/.chainlit/translations/pt-BR.json53 "placeholder": "Digite sua mensagem aqui..."CODE
LOWexamples/chainlit/.chainlit/translations/en-US.json53 "placeholder": "Ask, respond, give feedback, or just 'c' for continue..."CODE
LOW.chainlit/translations/pt-BR.json53 "placeholder": "Digite sua mensagem aqui..."CODE
LOW.chainlit/translations/en-US.json53 "placeholder": "Ask, respond, give feedback, or just 'c' for continue..."CODE
AI Structural Patterns32 hits · 30 pts
SeverityFileLineSnippetContext
LOWtests/main/test_table_chat_agent.py60CODE
LOWtests/main/test_seltz_search.py30CODE
LOWexamples/chainlit/multi-agent-nested-tool.py47CODE
LOW…mples/chainlit/non-callback/chat-search-no-callback.py31CODE
LOW…mples/chainlit/non-callback/chat-search-no-callback.py38CODE
LOWexamples/chainlit/non-callback/chat-tool-no-callback.py38CODE
LOWexamples/docqa/chat.py53CODE
LOWexamples/docqa/rag-concurrent.py132CODE
LOWexamples/docqa/doc-chunk-enrich.py263CODE
LOWexamples/basic/fn-call-local-numerical.py106CODE
LOW…amples/basic/multi-agent-search-critic/search_agent.py130CODE
LOW…asic/multi-agent-search-critic-no-orch/search_agent.py130CODE
LOWlangroid/embedding_models/protoc/embeddings_pb2_grpc.py53CODE
LOWlangroid/language_models/openai_gpt.py974CODE
LOWlangroid/language_models/openai_gpt.py1139CODE
LOWlangroid/language_models/openai_gpt.py1582CODE
LOWlangroid/agent/task.py209CODE
LOWlangroid/agent/task.py789CODE
LOWlangroid/agent/task.py957CODE
LOWlangroid/agent/task.py1539CODE
LOWlangroid/agent/batch.py268CODE
LOWlangroid/agent/batch.py367CODE
LOWlangroid/agent/batch.py484CODE
LOWlangroid/agent/base.py618CODE
LOWlangroid/agent/base.py876CODE
LOWlangroid/agent/base.py929CODE
LOWlangroid/agent/base.py1122CODE
LOWlangroid/agent/tools/task_tool.py218CODE
LOWlangroid/agent/tools/task_tool.py255CODE
LOWlangroid/agent/tools/mcp/fastmcp_client.py85CODE
LOWlangroid/agent/special/relevance_extractor_agent.py87CODE
LOWlangroid/agent/special/relevance_extractor_agent.py118CODE
Structural Annotation Overuse11 hits · 23 pts
SeverityFileLineSnippetContext
LOWdocs/blog/posts/malade.md111### Step 2: Identifying Drug-Outcome Associations (`DrugOutcomeInfoAgent`)COMMENT
LOWdocs/blog/posts/malade.md129### Step 3: Labeling Drug Category-Outcome Associations (`CategoryOutcomeRiskAgent`)COMMENT
LOWdocs/notes/portkey.md433# Step 1: Basic PortkeyCOMMENT
LOWdocs/notes/portkey.md438# Step 2: Add cachingCOMMENT
LOWdocs/notes/portkey.md446# Step 3: Add observabilityCOMMENT
LOWissues/html-logger-implementation.md43#### Step 1: Create HTML Logger FoundationCOMMENT
LOWissues/html-logger-implementation.md48#### Step 2: Integrate with Task SystemCOMMENT
LOWissues/html-logger-implementation.md53#### Step 3: Implement HTML GenerationCOMMENT
LOWissues/html-logger-implementation.md58#### Step 4: Add JavaScript FunctionalityCOMMENT
LOWlangroid/parsing/url_loader.py490 # Step 1: Separate URLs into documents and web pagesCOMMENT
LOWlangroid/parsing/url_loader.py498 # Step 2: Process web page URLs asynchronouslyCOMMENT
AI Slop Vocabulary17 hits · 19 pts
SeverityFileLineSnippetContext
LOWtests/main/test_doc_chat_agent.py277 # to just use ChatAgent's LLM response - this ensures that the system msgSTRING
MEDIUMtests/main/test_mcp_tools.py736 # Add timeout and robust skipping similar to npx testSTRING
LOWtests/main/test_json.py179 # Test cases that should not crash, just return ""COMMENT
LOWtests/main/test_json.py193 # Should never crash, just return empty string or found valueCOMMENT
LOWtests/extras/test_doc_chat_agent_llamacpp.py335 # to just use ChatAgent's LLM response - this ensures that the system msgSTRING
MEDIUMexamples/docqa/rag-concurrent.py34# Use Langroid's built-in run_batch_tasks harness instead of the custom oneSTRING
LOWexamples/basic/schedule-extract.py112 # from the input text. For this example, we'll just return a placeholder.STRING
LOWlangroid/mytypes.py96 # If parsing fails, just use the original dateCOMMENT
LOWlangroid/language_models/openai_gpt.py495 # so we can just use `openai.*` methods directly,STRING
LOWlangroid/agent/chat_agent.py691 # Otherwise just return `no_tool_option` as is:COMMENT
LOWlangroid/agent/tools/mcp/fastmcp_client.py660 # Otherwise, just return the text contentCOMMENT
LOWlangroid/agent/special/doc_chat_agent.py728 # no filter, so just use the docs passed inSTRING
LOWlangroid/agent/special/doc_chat_agent.py1642 # no relevance extraction: simply return passagesSTRING
LOWlangroid/parsing/utils.py189 # just add them to the last sentence and breakCOMMENT
LOWlangroid/parsing/md_parser.py316 # we just add it anyway to avoid creating a tiny final chunk.COMMENT
LOWlangroid/parsing/md_parser.py546 # Pure text, no hierarchy, so just use recursive_chunkCOMMENT
LOWlangroid/parsing/urls.py156 # no need to crawl, just return the original listSTRING
Slop Phrases9 hits · 17 pts
SeverityFileLineSnippetContext
LOWexamples/chainlit/dependency_chatbot.py232 DON'T forget to include the package name in your questions.CODE
MEDIUMexamples/docqa/rag-local-simple.py44 # Once this works, then you can try the DocChatAgentCOMMENT
MEDIUMexamples/summarize/summ-batch.py56 # Once this works, then you can try the DocChatAgentCOMMENT
MEDIUMexamples/summarize/summ.py54 # Once this works, then you can try the DocChatAgentCOMMENT
MEDIUMexamples/basic/fn-call-local-numerical.py152 # Once this works, then you can try the rest of the example.STRING
MEDIUMexamples/basic/fn-call-local-simple.py105 # Once this works, then you can try the rest of the example.COMMENT
LOWexamples/kg-chat/dependency_chatbot.py255 DON'T forget to include the package name in your questions.CODE
LOWlangroid/agent/xml_tool_message.py336 Make sure to replace the placeholders with actual valuesCODE
MEDIUMlangroid/parsing/md_parser.py566 # (you can adjust chunk_size, overlap_tokens, variation_percent)STRING
Magic Placeholder Names3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHdocs/notes/weaviate.md28 WEAVIATE_API_KEY=<your_api_key>CODE
HIGHdocs/notes/tavily_search.md22 TAVILY_API_KEY=<your_api_key>CODE
HIGHdocs/notes/seltz_search.md22 SELTZ_API_KEY=<your_api_key>CODE
Synthetic Comment Markers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHlangroid/language_models/base.py168 Represents a single tool call in a list of tool calls generated by OpenAI LLM API.CODE
Verbosity Indicators2 hits · 4 pts
SeverityFileLineSnippetContext
LOWlangroid/parsing/url_loader.py490 # Step 1: Separate URLs into documents and web pagesCOMMENT
LOWlangroid/parsing/url_loader.py498 # Step 2: Process web page URLs asynchronouslyCOMMENT
Example Usage Blocks2 hits · 2 pts
SeverityFileLineSnippetContext
LOWlangroid/parsing/md_parser.py557 # Example usage:COMMENT
LOWlangroid/parsing/urls.py277 # Example usageSTRING
TODO Padding1 hit · 2 pts
SeverityFileLineSnippetContext
LOWlangroid/embedding_models/models.py43 # TODO: Add auth support for Azure OpenAI via AzureADTokenProviderCOMMENT