Skip to content

Graphical Apps Development .cursorrules prompt file

Author: Dmitriy Leybel

What you can build

AI Chatbot Builder Platform: A no-code or low-code platform for businesses and individuals to create custom AI chatbots by chaining together Elements. Users can interactively select and connect pre-built Elements for chat interfaces, LLM integration, and data management to deploy tailored chat solutions quickly.Interactive AI Workshop Software: An educational tool that allows teachers and students to explore AI concepts by building graphical or API-based AI applications using Elements. This can help learners visualize AI workflows and understand the components of AI systems by connecting Elements in a classroom setting.AI Model Experimentation Suite: A platform for data scientists and AI researchers to prototype and test machine learning models by assembling Elements into workflows. They can easily swap out or modify Elements for model creation, data handling, and result visualization to iterate quickly on AI solutions.LLM-based API Creator: A service that enables developers to create custom APIs by combining various Elements focused on API design. Integrate LLMs into APIs with different models and endpoints by selecting appropriate Elements and linking them to provide desired functionalities.Interactive Documentation Generator: A tool that auto-generates interactive documentation for software projects. Users can design UIs for demonstrating API functionalities by connecting Elements, allowing end-users to experience live and interactive API documentation.Collaborative AI Development Environment: A collaborative platform that allows multiple users to work on AI projects simultaneously by visually chaining Elements and Payloads. This service facilitates version control, real-time collaboration, and sharing of AI workflows among team members.AI-Powered Data Analysis Dashboard: An application that merges data analytics and LLMs by connecting Elements for data processing, LLM interaction, and visualization. Users can create personalized dashboards that provide insights and predictions through customizable Elements.Customizable Virtual Assistant Interface: An interactive tool for creating virtual personal assistants by chaining relevant Elements to handle tasks like scheduling, reminders, and information retrieval through LLMs' functions and an interactive chat interface.Game AI Development Kit: A kit for game developers to create intelligent NPCs or in-game characters by assembling Elements that simulate decision-making and generate dialogues using LLMs, creating dynamic and interactive in-game experiences.AI-Driven Customer Support Portal: A customizable platform for building automated customer support systems by selecting Elements for handling FAQs, chat interactions, and feedback collection, all backed by adaptable LLM models for language processing.

Benefits

Extensible Modularity: Prioritizes extensibility and modularity, allowing developers to easily customize and create new Elements with clean, intuitive interfaces.Observer Pattern Ports: Utilizes an observer pattern for port connections, linking output and input ports to facilitate communication between Elements through event notifications.Component-Based Architecture: Employs a component-based design with Models and Views to handle data logic and UI, enhancing flexibility in Element and Payload construction.

Synopsis

Pyllments is ideal for developers building modular, extensible Python applications with LLM capabilities using graphical and API-based interfaces, promoting component reuse and UI consistency.

Overview of .cursorrules prompt

The .cursorrules file outlines a Python library named "Pyllments," designed for building graphical and API-based applications involving LLMs (Large Language Models) by connecting modular components called Elements. Each Element is a composite of a Model for data and logic, and Views for UI interaction. These Elements are interconnected through Ports, allowing dynamic, observer pattern-based communication. A Payload, another component type with its Model and Views, facilitates data handling and UI generation within Elements. The project is being developed into a complete framework, focusing on developer-friendly features such as extensibility, modularity, and customizable interfaces. The library leverages Panel for visualization, Param for class parameterization, and Langchain for LLM workflows. Docstrings should adhere to NumPy/SciPy documentation styles.

.cursorrules Content

json
# Project SynopsisPyllments is a Python library for building graphical and API-based LLM applications through chaining together Elements in a potentially cyclic graph. Elements and Payloads are a type of Components. A Component is composed of a Model and Views. The Model handles the underlying data and logic, while the Views are the UI components that are used to display display the interactive UI used to interact with the Model. An Element is a type of Component that is responsible for a specific function. For instance, an Element can handle the LLM selection and generation by making calls to LLM providers. Another Element may handle the chat interface, whose Model would store the chat message history, and the Views would be the text boxes and buttons used to interact with the chat interface. Elements are meant to connect to other Elements through Ports. All that is necessary to link Elements together is to link the output port of one Element to the input port of Another. Each output port may have unlimited input ports it connects to, and each input port may have unlimited output ports it connects to. The ports follow an observer pattern where the output port is the subject and the input port is the observer. The subject notifies the observers when a certain event that we set within the Element is triggered. In order to connect an input and and output port, they need to be setup in a manner that sends and receives the same type of Payload. A Payload is also a Component with a Model as well as views responsible for the display logic. Elements may receive payloads and use methods of the Payload to generate the views for the UI. The sending Element is responsible for packing data into the Payload.  I am currently working on making this a fully-fledged framework.# Project OrganizationHere is an example of the file structure of an individual element:chat_interface:  - __init__.py  - chat_interface_element.py  - chat_interface_model.py  - css:    - buttons.css    - column.css    - input.css# Primary Libraries Used- Panel is used to create the visualization layer and run the GUI. Views tend to consist of Panel objects which can be styled with Python and CSS.- Param is used to create parameterized classes which help create parameters that handle type validation, default values, constraints, and most importantly, reactivity(setting event handlers to catch changes).- Langchain is responsible for the specific functions pertaining to incorporating LLM workflows.# Development PrioritiesPyllments code is prioritized on being developer-friendly, where extensibility and modularity are first-class citizens. Elements should be customizeable with clean and intuitive interfaces. It should also be easy to create new elements depending on the needs of the developer. # DocumentationDocstrings should use a NumPy/SciPy style.

Released under the MIT License.