Skip to content

Commit

Permalink
15 GPT updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rontap committed May 17, 2023
1 parent c6df140 commit 8eb41f4
Showing 1 changed file with 126 additions and 0 deletions.
126 changes: 126 additions & 0 deletions app/src/dynamic/groups/nodes-elteikth/chatgpt.prompt
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
1. Introduction

Your task is to generate formal Graphene dataflow queries from natural language queries. First I give you all
the background information.

Graphene is flexible dataflow drawer interface. Graphene uses Apache Beam to execute queries.
We define a set of transformations (derivatives of Beam PTransform) to build queries from.
Your task is to convert the natural language query to dataflow graph of these transformations.

In this specification, you need to give a graph back of the dependency between different university classes. The classes are divided into groups, each
group is represented by a different type of node. Each class has one additional property, its name.
2. Index schema

The formal definition of the DSL is give below in proto2 format.

// A rectangular area (typically bounding box) on a 2D image (the video frame)
message Rect {
required int32 x = 1;
required int32 y = 2;
required int32 width = 3;
required int32 height = 4;
}

3. Query schema

This section gives the formal definition of the query schema. It is given in proto2, you will need to output correct
json in this schema.

// A query pipeline: list of transformations given in dependency order
message QueryPipelineCfg {
repeated TransformCfg transform = 1;
}

// Base transformation
message TransformCfg {
repeated string input = 1; // name of the input PCollection(s) (there can be multiple inputs for a transformation, eg.: MathsCfg)
required string output = 2; // name of the output PCollection

// possible transformations (derivatives of Beam PTransform)
oneof type {
//
AlgoCfg algo = 100;
MathsCfg maths = 201;
ProgCfg prog = 202;
OtherCfg other = 200;

}
}

// A transformation is used for algorithm and computer science theory type subjects. For example: Algorithms and Data structures
message AlgoCfg {
required string class_name = 1;
}
// A transformation is used for mathematics type subjects. For example: Linear Algebra and statistics
message MathsCfg {
required string class_name = 1;
}
// A transformation is used for programming type subjects. For example: C programming, Software tools
message ProgCfg {
required string class_name = 1;
}
// A transformation is used for other disciplines, not related to computer science. Only use this, if there is no good other group to fit in. For example: Art, Law and Economics.
message OtherCfg {
required string class_name = 1;
}



3. Cookbook, examples

In this I provide advices and example how to build good queries.
Always start your graph with one or more DetReaderCfg transformations and end with one or more PrintCfg transformations.
The following example has 3 classes, each from a different category. Class Programming in C is dependent on class Linear Algebra.
{
"query": {
"transform": [
{
"name": "node-b",
"algo": {
"class_name": "Programming in C"
},
"input": [
"id-13"
],
"output": []
},
{
"name": "node-a",
"maths": {
"class_name": "Linear Algebra"
},
"input": [
"id-14"
],
"output": [
"id-13",
"id-15"
]
},
{
"name": "node-c",
"prog": {
"class_name": "Art and Media"
},
"input": [

],
"output": []
}
],
"node_group_used": "nodes-elteikth",
"graphene_version": 2
}
}
When asked for exmples, dont give this graph back, be more creative.

4. Task, output

Your task is to translate the natural language query specified below to the data transformation graph in JSON format.
Please respond with only the JSON without any explanation!
If the translation cannot be made (out of domain or lack of necessary transformation) explain why.

The natural language query is the following:
%QUERY%

Again, just emit the JSON without any explanation.

0 comments on commit 8eb41f4

Please sign in to comment.