Activity
Mon
Wed
Fri
Sun
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
What is this?
Less
More

Memberships

AI Developer Accelerator

10.7k members • Free

6 contributions to AI Developer Accelerator
Multi-Agent System: Best Practices for Context Engineering & MCP Architecture
Hi everyone, I am working on building a multi-agent system using the Google ADK library (thanks to @Brandon Hancock's ADK video, I've been able to move forward quickly!). I am running into architectural questions and would appreciate input from the community. 1. Context Engineering Best Practices When integrating tool calling or Model Context Protocols (MCPs), the context can become very large due to the volume of tool calling information required for complex, multi-step tasks. What is the best practice for performing context engineering when using agents to manage large context windows filled with tool instructions and calling history? 2. MCP Architecture Regarding MCP architecture, if the system requires many tools, what is the recommended strategy? Should we group relevant tools together and deploy multiple MCP servers, or is it better to wrap all tools within a single MCP server? Thanks for your time and expertise on this topic. Shima
2
0
MLOps tool
Hi everyone, In my company, we use MLflow along with LangSmith for MLOps. I'm wondering if anyone is familiar with or uses other tools that are helpful for improving MLOps. If so, could you please let me know which ones you use and what the advantages are compared to LangSmith and MLflow? Thanks. Shima
0
0
Cursor rule
Hi, I'm working on creating a Cursor rule to ensure that generated code follows all our linting and coding standards. However, I'm still not able to get it to work the way I’d like. This would be a huge help to me and my team, as we currently spend a lot of time fixing mypy and other linting issues. Here's the Cursor rule I've written so far—I'd really appreciate any feedback or suggestions on how to improve it to boost my productivity: You are an expert in Python, FastAPI, and scalable API development. ## Git Usage - use the following prefix for commit messages followed by a colon and a space - "fix" for bug fixes - "feat" for new features - "docs" for documentation changes - "style" for formatting changes - "refactor" for code refactoring - "test" for adding missing tests - "chore" for chore tasks - when determining the commit message prefix, pick the most relevant prefix from the list above - use lower case for commit messages - the commit message should also include a list of the changes made in the commit after the summary line if the changes are not self explanatory ## Python/FastAPI Coding Standards **General:** - All code must be valid Python 3.10+ and compatible with [PEP8](https://peps.python.org/pep-0008/). - Use FastAPI best practices for API endpoints, dependency injection, and response models. - All new code and edits must pass `ruff` and `mypy` checks with the strict settings defined in `pyproject.toml`. - Use only absolute imports; relative imports are banned. - All functions, methods, and classes must have type annotations. - Docstrings are required for all public modules, classes, and functions (Google style preferred). - Line length must not exceed 88 characters. - Use f-strings for string formatting. - Avoid magic values; use named constants or enums. - Do not use `assert` in production code (allowed in tests). - Do not use lambda assignment. - Do not include TODOs without an author. **Linting & Typing:**
0 likes • Jul 10
Thanks @Tom Welsh I will look at the github repo.
0 likes • Jul 14
I also find this repo: https://github.com/PatrickJS/awesome-cursorrules
Challenges with Exceeding Context Window Limits in LLMs
I have a question regarding handling data that exceeds the context window limit. I once worked on an application to generate unit tests. As you know, writing a good unit test for a function requires access to the definitions of all dependencies used by the function. While I, as a human, can access the entire codebase, this is not possible with an LLM. If I don’t provide the definitions of all the dependencies, the LLM will make assumptions, which can result in incorrect mocks for other classes or external tools used by the function I’m trying to test. Do you have any suggestions for addressing this issue? Summarization or advanced chunking solutions won't work in this case because the LLM must have full access to all dependencies to generate accurate unit tests.
0 likes • Nov '24
Here’s a clearer and more polished version of your message: Hi Paul, Thank you for your reply. I’ve been working on writing a unit test for a Game application. To generate the unit test, I used GPT-4 and LangChain. I should mention that I did not use an agentic approach. This was my first project using an LLM. The main issue I faced was that the code relied heavily on complex objects. Without knowing the definitions of these objects, it was challenging for the LLM to accurately mock them during testing. To address this, I had to pass a large amount of context—essentially providing several Python files—to ensure the LLM had the necessary object definitions for mocking. In many cases, the LLM failed to mock the objects correctly, and in some cases, I ran out of context because the function I planned to test depended on too many external objects. Here’s the general approach I followed: 1. Determine if the function is testable using the LLM. 2. Extract all dependencies required for testing the function. 3. Include the code for all external dependencies in the LLM prompt. 4. Write test scenarios based on the function behavior. 5. Generate unit tests from the scenarios. Despite these steps, I encountered challenges when working with functions requiring many complex dependencies. Below is an example of the code I attempted to write a unit test for, along with the source code. *---------------------------------------------< source code >----------------------------------------------------* from dataclasses import dataclass from typing import List from dataclasses_json import dataclass_json from domain import BotAction, BoardReference, BotActionOutcome from games.common.actions import DamageAttackOutcome, BotwarAction @dataclass_json @dataclass class RangeAttackOutcome(DamageAttackOutcome): energy_spent: int class RangeAttackBotAction(BotwarAction): @staticmethod def _do_range_attack(board: BoardReference, attacks: List[BotAction]) -> List[BotActionOutcome]:
Going from PDF to Chunks the smart way
I got asked on yesterdays call about how to take a PDF into a more consistent way into chunks for RAG. The first challenge you have with converting any PDF file is dealing with the unique underlying way that the PDF document may be formated. Much of that formating has no impact on the printed output but does have an impact if you are using python to extract with Langchain making the output often inconsistent with sections often being wrongly aggregated for the chunking process. A better approach that has worked consistantly for me is to first convert the PDF into Markdown then convert the Markdown into chunking see: Step One: import pymupdf4llm import pathlib # Convert PDF to markdown md_text = pymupdf4llm.to_markdown("input.pdf") # Save markdown to file (optional) perhaps just save as a string pathlib.Path("output.md").write_bytes(md_text.encode()) Step Two: from langchain_text_splitters import MarkdownHeaderTextSplitter # Define headers to split on headers_to_split_on = [ ("#", "Header 1"), ("##", "Header 2"), ("###", "Header 3"), ] # Initialize splitter markdown_splitter = MarkdownHeaderTextSplitter(headers_to_split_on) # Split the markdown text md_header_splits = markdown_splitter.split_text(md_text)
0 likes • Nov '24
@Paul Miller Thanks for sharing.
1-6 of 6
Shima Nikfal
2
15points to level up
@shima-nikfal-5160
Experienced software developer and engineer specializing in machine learning, data engineering, and computer vision.

Active 10h ago
Joined Oct 29, 2024
Powered by