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

Add JSON examples for information discovery #182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions examples/information_discovery/ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# DSEP JSON Structure Documentation

## The 3 major types of interactions
1. The user interactions
2. The system processes
3. The seller/vendor responses

## The breakdown of the user interaction flow:
- Discovery of a product/service
- Consumption of a product/service
- Accessing support
- Providing rating and submitting feedback

## Detailed Breakdown:
- Discovery of a product/service:
- User's search request JSON
- System's search results JSON

- Consumption of a product/service:
- User's content selection JSON

- Accessing support:
- User's support request JSON
- Vendor's support response JSON

- Providing rating and submitting feedback:
- User's rating/feedback submission JSON

## General Structure of the JSON
1. **Context field** (This is a part of the "Context" in the beckn protocol structure.)
- `"domain"`: "dsep:advisory"
- `"action"`: "search", "select", "support", "feedback"
- `"timestamp"`: the timestamp of the message
- `"transaction_id"`: an ID generated for a particular chat session
- `"language"`: "en" or any other supported language code

2. **Message field**
- The contents of this field depend on the specific action in the user interaction flow.

## The Various JSON Files

1. `Search_Req`: User's search request
- Message Field contains:
- `"intent"`:
- `"category"`: The category of the user request (e.g., agriculture, technology, education)
- `"item"`: The subject of the request or problem encountered
- `"content-type"`: The type of content requested - `Video`, `PDF`, `Text`, `Audio`

2. `Search_Results`: System's response to search request
- Message Field contains:
- `"catalog"`:
- `"providers"`: An array of content providers
- `"provider_id"`: Unique identifier for the provider
- `"descriptor"`: Name of the provider
- `"services"`: Array of content items with relevant details

3. `Consumption`: User's content selection
- Message Field contains:
- `"order"`:
- `"item"`: The selected content (video/pdf) with description and link
- `"fulfillment"`: Content type and provider details

4. `Support`: User's support request
- Message Field contains:
- `"support-request"`:
- `"type"`: Type of support request (`Post-viewing Query`, `Technical Support`, `Content Clarification`, `Additional Resources`, `Expert Consultation`)
- `"customer"`: Customer details (individual/organization)

5. `Support_Resp`: Agency's response to support request
- Message Field contains:
- `"support_response"`:
- `"ref_id"`: Reference ID for the request
- `"type"`: Type of query with response
- `"provider"`: Provider details

6. `Feedback`: User feedback
- Message Field contains:
- `"feedback"`:
- `"customer"`: Customer details
- `"rating"`: Numerical rating
- `"descriptor"`: Feedback comment
29 changes: 29 additions & 0 deletions examples/information_discovery/Search_Req.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"context": {
"domain": "dsep:advisory",
"action": "search",
"timestamp": "2024-07-01T10:30:00.000Z",
"transaction_id": "1234-5678-9101",
"language": "en"
},
"message": {
"intent": {
"category": {
"descriptor": {
"name": "Agriculture"
}
},
"item": {
"descriptor": {
"name": "Aphid infestation remedies"
}
},
"provider": {
"descriptor": {
"name": "Any"
}
},
"content-type": "Video"
}
}
}
45 changes: 45 additions & 0 deletions examples/information_discovery/Search_Results.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"context": {
"domain": "dsep:advisory",
"action": "on_search",
"timestamp": "2024-07-01T10:32:00.000Z",
"transaction_id": "1234-5678-9101",
"language": "en"
},
"message": {
"catalog": {
"descriptor": {
"name": "Search Results for Aphid infestation remedies"
},
"providers": [
{
"provider_id": "provider1",
"descriptor": {
"name": "AgroExpert Solutions"
},
"services": {
"items": [
{
"id": "video123",
"descriptor": {
"name": "Effective Aphid Control Methods",
"long_desc": "A 2-minute video on controlling aphid infestations in wheat crops",
"link":"https://youtube.com/agr-bz1s34k-jkr"
},
"category": {
"id": "AGR-VID-APH",
"descriptor": {
"name": "Agriculture Video - Aphid Control"
}
},
"content-type": {
"type": "Video"
}
}
]
}
}
]
}
}
}
24 changes: 24 additions & 0 deletions examples/information_discovery/Support_Resp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"context": {
"domain": "dsep:advisory",
"action": "on_support",
"timestamp": "2024-07-01T10:45:00.000Z",
"transaction_id": "3456-7890-1234",
"language": "en"
},
"message": {
"support_response": {
"ref_id": "video123",
"type": "Post-viewing Query",
"descriptor": {
"name": "Response to query on organic pesticides",
"long_desc": "Detailed information on the organic pesticides mentioned in the video, including application methods and precautions."
},
"provider": {
"descriptor": {
"name": "AgroExpert Solutions"
}
}
}
}
}
29 changes: 29 additions & 0 deletions examples/information_discovery/consumption.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"context": {
"domain": "dsep:advisory",
"action": "select",
"timestamp": "2024-07-01T10:35:00.000Z",
"transaction_id": "2345-6789-0123",
"language": "en"
},
"message": {
"order": {
"item": {
"id": "video123",
"descriptor": {
"name": "Effective Aphid Control Methods",
"long_desc": "A 2-minute video on controlling aphid infestations in wheat crops",
"link":"https://youtube.com/agr-bz1s34k-jkr"
},
"fulfillment": {
"type": "Online",
"agent": {
"name": "AgroExpert Solutions",
"long_desc": "We at AgroExpert Solutions, develop simple, effective and affordable remedies for common agriculture related problems.",
"product_sold": "pesticide"
}
}
}
}
}
}
26 changes: 26 additions & 0 deletions examples/information_discovery/feedback.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"context": {
"domain": "dsep:advisory",
"action": "feedback",
"timestamp": "2024-07-01T11:00:00.000Z",
"transaction_id": "4567-8901-2345",
"language": "en"
},
"message": {
"feedback": {
"ref_id": "video123",
"customer": {
"name": "Moti",
"type": "Individual"
},
"rating": {
"value": 4,
"max_value": 5
},
"descriptor": {
"comment": "Very helpful video",
"long_desc": "The video was clear and informative. I especially appreciated the practical demonstration of applying the organic pesticide."
}
}
}
}
23 changes: 23 additions & 0 deletions examples/information_discovery/support.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"context": {
"domain": "dsep:advisory",
"action": "support",
"timestamp": "2024-07-01T10:40:00.000Z",
"transaction_id": "3456-7890-1234",
"language": "en"
},
"message": {
"support-request": {
"ref_id": "video123",
"type": "Post-viewing Query",
"descriptor": {
"name": "Additional information on aphid control",
"long_desc": "I need more details on the organic pesticides mentioned in the video"
},
"customer": {
"name": "Moti",
"type":"Individual"
}
}
}
}