| 1 | ONTOLOGY_DETECTION_SYSTEM_PROMPT = """Create SQL statement which will capture the different entities and the relations between them in the provided text. |
| 2 | Each table should represent either a single entity type with the entity's attributes as the table columns or a relation between two entities, using foreign keys. |
| 3 | For example an IMDB document is likely to produce 5 tables: Movie, Actor and Director each with its own columns and ACTED and DIRECTED tables. |
| 4 | Do not create an ID primary key column but set the most compelling attribute as the entity's primary key |
| 5 | Make sure to call the run_sql function provided in your tools set for each sql statement generated.""" |
| 6 | |
| 7 | KNOWLEDGE_EXTRACTION_SYSTEM_PROMPT = """You are a helpful assistant with the goal of extracting |
| 8 | entities and relationships from text""" |
| 9 | |
| 10 | SQL_FOLDING_PROMPT = """The following two CREATE TABLE SQL statments are |
| 11 | creating the same table name, consolidate the two into a single |
| 12 | CREATE TABLE SQL statment. |
| 13 | Remove all duplicated columns. |
| 14 | Make sure the number of PRIMARY KEYs and FOREIGN KEYs is maintained. |
| 15 | Reply only with the result SQL statment, the reply should start with: |
| 16 | CREATE TABLE and end with ); |
| 17 | For example: given the two CREATE TABLE SQL: |
| 18 | CREATE TABLE Person (FirstName string, LastName string, Age int); |
| 19 | CREATE TABLE Person (SurName string, ForeName string, Height int); |
| 20 | The response should be: |
| 21 | CREATE TABLE Person (FirstName string, LastName string, Age int, Height int); |
| 22 | """ |
| 23 | |
| 24 | SQL_FOCUS_PROMPT = """Given a CREATE TABLE SQL statment the table name |
| 25 | represents some entity, in case the number of columns in the table is |
| 26 | greater than 5, remove columns which are less descriptive of the entity. |
| 27 | Do NOT remove columns which are either a PRIMARY KEY or a FOREIGN KEY. |
| 28 | Make sure to leave at least 5 columns. |
| 29 | Do NOT rename the table name. |
| 30 | Reply only with the result SQL statment, the reply should start with: |
| 31 | CREATE TABLE and end with ); |
| 32 | For example: given the CREATE TABLE SQL: |
| 33 | CREATE TABLE Movie ( |
| 34 | Title string PRIMARY KEY, |
| 35 | Genre string, |
| 36 | ReleaseYear int, |
| 37 | Rating string, |
| 38 | Language string, |
| 39 | BoxOffice string, |
| 40 | streaming_date STRING, |
| 41 | runtime STRING |
| 42 | ); |
| 43 | The response should be: |
| 44 | CREATE TABLE Movie ( |
| 45 | Title string PRIMARY KEY, |
| 46 | Genre string, |
| 47 | ReleaseYear int, |
| 48 | Rating string, |
| 49 | runtime STRING |
| 50 | ); |
| 51 | Another example: given the CREATE TABLE SQL: |
| 52 | CREATE TABLE Episode ( |
| 53 | show_title VARCHAR(255), |
| 54 | show_year VARCHAR(4), |
| 55 | season INT, |
| 56 | episode_number INT, |
| 57 | episode_title VARCHAR(255), |
| 58 | air_date DATE, |
| 59 | episode_rating DECIMAL(2, 1), |
| 60 | FOREIGN KEY (show_title, show_year) REFERENCES TVShow(title, year) |
| 61 | ); |
| 62 | You are not allowed to remove either show_title or show_year as these are part of the table's |
| 63 | foreign key. |
| 64 | """ |
| 65 | |
| 66 | RELATIONSHIP_NAMING_PROMPT = """"You are a Cypher expert, help suggest names for |
| 67 | relationship types connecting source node to destination node. |
| 68 | Respond only with the suggested name. |
| 69 | For example given source node of type 'Actor' and destination node of type 'Movie' |
| 70 | Replay with: ACTED""" |
| 71 | |
| 72 | FIND_UNIQUE_ATTRIBUTE_PROMPT = """From the list of attributes describing a graph node |
| 73 | pick the most suitble attribute to act as a unique identifier of the node. |
| 74 | Respond only with the suggested attribute name |
| 75 | For example given a list of attributes: series_title, air_date, season_number, episode_number, title |
| 76 | Describing the graph entity "Episode" Reply with: title""" |