Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UNIT] llama-index framework - release 3/3/25 #22

Open
wants to merge 72 commits into
base: main
Choose a base branch
from

Conversation

davidberenstein1957
Copy link
Member

No description provided.

@burtenshaw
Copy link
Collaborator

Looks nice. I don't see anything on:

  • integrations with databases and APIs
  • sentence transformers

@davidberenstein1957
Copy link
Member Author

Looks nice. I don't see anything on:

  • integrations with databases and APIs
  • sentence transformers

Yes, I've updated the ToC outside of here in a Google Docs, will update based on the feedback of llama-indextomorrow.

@burtenshaw burtenshaw changed the title Add general outline llama-index based on TOC [UNIT] llama-index framework - release 3/3/25 Feb 10, 2025
@burtenshaw burtenshaw marked this pull request as draft February 10, 2025 12:34
@burtenshaw burtenshaw self-requested a review February 10, 2025 12:35
@burtenshaw
Copy link
Collaborator

@davidberenstein1957 We'll release this unit in 3 weeks.

@HuggingFaceDocBuilderDev
Copy link
Collaborator

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@davidberenstein1957 davidberenstein1957 marked this pull request as ready for review February 10, 2025 17:27
@davidberenstein1957 davidberenstein1957 marked this pull request as draft February 10, 2025 17:27
@davidberenstein1957 davidberenstein1957 marked this pull request as ready for review February 12, 2025 20:07
Copy link
Member

@simoninithomas simoninithomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work, thanks to that I didn't have a lot to update but some quick questions:

  • Do you provide notebooks for users to rapidly try llama-index? It's what we did for smolagents and it really helps usage (because low friction since nothing to install on your computer).

  • If yes, we should add the notebooks to agentcourse/notebooks in HF + put links in the sections like we did with smolagents (check smolagents sections to see an example).

Also there was some typos, display problems don't hesitate to check the final look here: https://moon-ci-docs.huggingface.co/learn/agents-course/pr_22/unit2/llama-index/components

@huggingface huggingface deleted a comment from logan-markewich Feb 27, 2025
@logan-markewich
Copy link

@simoninithomas yea we have tons of notebooks -- although looking at the smolagents notebooks, it looks pretty tailored to the course. I can copy those but just migrate the code/concepts to llama-index? Or any other ideas/thoughts on that?

- Enhance components and tools notebooks with more detailed code examples
- Update installation instructions and code formatting
- Add more descriptive comments and improve code readability
- Minor updates to MDX documentation to reflect notebook changes
…examples

- Add dependencies installation section
- Implement basic agent initialization with multiplication tool
- Demonstrate context preservation in agent interactions
- Create RAG agent using QueryEngineTool
- Develop multi-agent system with calculator and query agents
- Update notebook metadata and kernel configuration
- Migrate to Hugging Face Inference API for LLM
- Add comprehensive workflow examples with multi-step and branching logic
- Implement workflow drawing functionality using pyvis
- Update notebook with state management and multi-agent workflow demonstrations
- Enhance code with more detailed comments and type hinting
…ebook

- Delete redundant flow visualization HTML files (flow.html and workflow_all_flows.html)
- Remove empty code cell from workflows notebook
- Simplify workflow example in MDX documentation

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super uber nit, but the spacing in some of the code (like in the query engine section) is triggering my OCD 😆 (I'd fix it myself, but I don't think I have permissions to push to this branch)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might actually set verbose=False on the AgentWorkflow, the output is a little hard to read when we are also streaming the response

Copy link

@logan-markewich logan-markewich Mar 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Loops and Branches section, the workflow doesn't actually loop

Needed to update the type annotations on step_one()

class MultiStepWorkflow(Workflow):
    @step
    async def step_one(self, ev: StartEvent | LoopEvent) -> ProcessingEvent | LoopEvent:
        if random.randint(0, 1) == 0:
            print("Bad thing happened")
            return LoopEvent(loop_output="Back to step one.")
        else:
            print("Good thing happened")
            return ProcessingEvent(intermediate_result="First step complete.")

    @step
    async def step_two(self, ev: ProcessingEvent) -> StopEvent:
        # Use the intermediate result
        final_result = f"Finished processing: {ev.intermediate_result}"
        return StopEvent(result=final_result)

Copy link

@logan-markewich logan-markewich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few more small comments, but beyond that, LGTM 👍🏻

davidberenstein1957 and others added 3 commits March 3, 2025 06:39
- Update function calls and method signatures in agents, components, tools, and workflows notebooks
- Improve parameter naming and add explicit keyword arguments
- Simplify code structure and remove unnecessary verbose settings
- Update type hints and function annotations
- Enhance code readability and consistency across notebooks
- Add Tip component with Google Colab notebook links for agents, components, tools, and workflows MDX files
- Provide direct links to corresponding Jupyter notebooks for easy code reference
- Enhance documentation with practical code exploration resources
@sergiopaniego
Copy link
Collaborator

In tools.mdx, there are some discrepancies between the notebook and the theory:

  • alfed_chroma_db -> alfred_chroma_db
  • db2.get_or_create_collection("alfred") -> db.get_or_create_collection("alfred")
  • The model used as llm for HuggingFaceInferenceAPI differs. meta-llama/Llama-3.2-3B-Instruct -> Qwen/Qwen2.5-Coder-32B-Instruct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants