callmexss / gpts-prompts

0 stars 0 forks source link

prompt: graph #5

Open callmexss opened 6 months ago

callmexss commented 6 months ago

{ "diagramGuidelines": "\nGuidelines when creating the graph diagram in any diagram language:\n- Avoid linear diagrams when possible, diagrams should be hierarchical and have multiple branches when applicable.\n- Don't add the label if its the same as the destination node.\n\nImportant rules when creating the graph diagram in mermaid syntax:\n- Prefer using graph TB types of diagrams.\n- Never use the ampersand (&) symbol in the diagram, it will break the diagram. Use the word \"and\" instead. For example use \"User and Admin\" instead of \"User & Admin\".\n- Never use round brackets () in the node identifiers, node labels and edge labels, it will break the diagram. Use a coma instead. For example use \"User, Admin\" instead of \"User (Admin)\".\n- Don't use empty labels \"\" for edges, instead don't label the edge at all. For example U[\"User\"] --> A[\"Admin\"].\n- Avoid using semicolon as line separator, prefer using new-lines instead. For example use \"graph LR\n A --> B\" instead of \"graph LR; A --> B\"\n\nRules when using graph diagrams in mermaid syntax:\n- Use short node identifiers, for example U for User or FS for File System.\n- Always use double quotes for node labels, for example U[\"User\"].\n- Never create edges that connect to only one node; each edge should always link two nodes together. For example U[\"User\"] -- \"User enters email\" is invalid, it should be U[\"User\"] -- \"User enters email\" --> V[\"Verification\"] or just U[\"User\"].\n- Always use double quotes for edge labels, for example U[\"User\"] -- \"User enters email\" --> V[\"Verification\"].\n- Indentation is very important, always indent according to the examples below.\n\nRules when using graph diagrams with subgraphs in mermaid syntax:\nNever refer to the subgraph root node from within the subgraph itself.\n\nFor example this is wrong subgraph usage:\n\ngraph TB\n subgraph M[\"Microsoft\"]\n A[\"Azure\"]\n M -- \"Invested in\" --> O\n end\n \n subgraph O[\"AI\"]\n C[\"Chat\"]\n end\n\n\nIn this diagram M is referenced from within the M subgraph, this will break the diagram.\nNever reference the subgraph node identifier from within the subgraph itself.\nInstead move any edges that connect the subgraph with other nodes or subgraphs outside of the subgraph like so.\n\nCorrect subgraph usage:\n\ngraph TB\n subgraph M[\"Microsoft\"]\n A[\"Azure\"]\n end\n\n M -- \"Invested in\" --> O\n \n subgraph O[\"OpenAI\"]\n C[\"ChatGPT\"]\n end\n\n\nExamples:\nUser asks: \"Show me how vscode internals work.\"\n\ngraph TB\n U[\"User\"] -- \"File Operations\" --> FO[\"File Operations\"]\n U -- \"Code Editor\" --> CE[\"Code Editor\"]\n FO -- \"Manipulation of Files\" --> FS[\"FileSystem\"]\n FS -- \"Write/Read\" --> D[\"Disk\"]\n FS -- \"Compress/Decompress\" --> ZL[\"ZipLib\"]\n FS -- \"Read\" --> IP[\"INIParser\"]\n CE -- \"Create/Display/Edit\" --> WV[\"Webview\"]\n CE -- \"Language/Code Analysis\" --> VCA[\"VSCodeAPI\"]\n VCA -- \"Talks to\" --> VE[\"ValidationEngine\"]\n WV -- \"Render UI\" --> HC[\"HTMLCSS\"]\n VE -- \"Decorate Errors\" --> ED[\"ErrorDecoration\"]\n VE -- \"Analyze Document\" --> TD[\"TextDocument\"]\n\n\nUser asks: \"Draw me a mindmap for beer brewing. Maximum of 4 nodes\"\n\ngraph TB\n B[\"Beer\"]\n B --> T[\"Types\"]\n B --> I[\"Ingredients\"]\n B --> BP[\"Brewing Process\"]\n\n\nUser asks:\n\"Computing backend data services is a distributed system made of multiple microservices.\n\nA web browser sends an HTTP api request to the load balancer.\nThe load balancer sends the http request to the crossover service.\nCrossover talks to redis and mysql database.\nCrossover makes a downstream API request to multiplex to submit the query which returns a job id to crossover.\nThen crossover makes a long poll API request to evaluator to get the results of the job.\nThen evaluator makes an API call to multiplex to check the status of the job.\nOnce evaluator gets a successful status response from multiplex, then evaluator makes a third API call to result-fetcher service to download the job results from S3 or GCP cloud buckets.\nThe result is streamed back through evaluator to crossover.\n\nCrossover post processes the result and returns the API response to the client.\n\nDraw me a diagram of this system\"\n\n\ngraph TB\n A[\"Web Browser\"] -- \"HTTP API Request\" --> B[\"Load Balancer\"]\n B -- \"HTTP Request\" --> C[\"Crossover\"]\n C -- \"Talks to\" --> D[\"Redis\"]\n C -- \"Talks to\" --> E[\"MySQL\"]\n C -- \"Downstream API Request\" --> F[\"Multiplex\"]\n F -- \"Returns Job ID\" --> C\n C -- \"Long Poll API Request\" --> G[\"Evaluator\"]\n G -- \"API Call\" --> F\n G -- \"API Call\" --> H[\"Result-Fetcher\"]\n H -- \"Downloads Results\" --> I[\"S3 or GCP Cloud Buckets\"]\n I -- \"Results Stream\" --> G\n G -- \"Results Stream\" --> C\n C -- \"API Response\" --> A\n\n\nSometimes you will need to revise the same diagram based on user feedback.\nFor the last example the user might make a followup request:\n\nUser followup ask:\n\"Crossover post processes the result and returns the API response to the client through the load balancer.\n\nDraw the crossover node in green\"\n\n\nquery: \"graph TB\n A[\"Web Browser\"] -- \"HTTP API Request\" --> B[\"Load Balancer\"]\n B -- \"HTTP Request\" --> C[\"Crossover\"]\n style C fill:#99cc99\n C -- \"Talks to\" --> D[\"Redis\"]\n C -- \"Talks to\" --> E[\"MySQL\"]\n C -- \"Downstream API Request\" --> F[\"Multiplex\"]\n F -- \"Returns Job ID\" --> C\n C -- \"Long Poll API Request\" --> G[\"Evaluator\"]\n G -- \"API Call\" --> F\n G -- \"API Call\" --> H[\"Result-Fetcher\"]\n H -- \"Downloads Results\" --> I[\"S3 or GCP Cloud Buckets\"]\n I -- \"Results Stream\" --> G\n G -- \"Results Stream\" --> C\n C -- \"API Response\" --> B\n B -- \"API Response\" --> A\n\n", "diagramLanguage": "mermaid", "diagramThemes": "\nmermaid themes:\n\ndefault - This is the default theme for all diagrams.\nneutral - This theme is great for black and white documents that will be printed.\ndark - This theme goes well with dark-colored elements or dark-mode.\nforest - This theme contains shades of green.\nbase - This is the only theme that can be modified. Use this theme as the base for customizations.\n\n\nTo customize the theme of an individual diagram, use the init directive. Add the directive before the start of the diagram definition.\n\n%%{init: {'theme':'forest'}}%%\n\n " }

callmexss commented 6 months ago

{ "diagramGuidelines": "\nGuidelines when creating the graph diagram in any diagram language:\n- Avoid linear diagrams when possible, diagrams should be hierarchical and have multiple branches when applicable.\n- Don't add the label if its the same as the destination node.\n", "diagramLanguage": "plantuml", "diagramThemes": "\nplantuml themes:\n\nnone\namiga\naws-orange\nblack-knight\nbluegray\nblueprint\ncarbon-gray\ncerulean\ncerulean-outline\ncloudscape-design\ncrt-amber\ncrt-green\ncyborg\ncyborg-outline\nhacker\nlightgray\nmars\nmateria\nmateria-outline\nmetal\nmimeograph\nminty\nmono\nplain\nreddress-darkblue\nreddress-darkgreen\nreddress-darkorange\nreddress-darkred\nreddress-lightblue\nreddress-lightgreen\nreddress-lightorange\nreddress-lightred\nsandstone\nsilver\nsketchy\nsketchy-outline\nspacelab\nspacelab-white\nsuperhero\nsuperhero-outline\ntoy\nunited\nvibrant\n\n\n\nTo use a theme use the \"!theme\" directive:\n\n!theme spacelab\n!theme aws-orange\n\n " }