Skip to main content
POST
/
ai
/
async-prediction
/
faq-enrichment
/
{MODEL_ID}
FAQ Enrichment use case
import requests

url = "https://application_id.applications.lucidworks.com/ai/async-prediction/faq-enrichment/{MODEL_ID}"

payload = {
    "batch": [{ "text": "Global Travel Spending and Payment Trends in 2024

Global tourism spending is expected to return to pre-pandemic levels in 2024. However, with inflation still affecting consumers, finding convenient and cost-effective payment methods remains a top priority for travelers. To understand payment preferences and behaviors, our Bank surveyed 1,800 consumers worldwide about their travel financing experiences and future spending plans. The findings highlight six key trends shaping how merchants can cater to global travelers.
1. Cash Remains Essential

While cash usage declined during the pandemic, it remains an important travel resource. Half of respondents use cash for purchases, while the other half carry it for emergencies. Asian travelers rely on cash the most—99% reported carrying it, compared to just 6% of total respondents who travel without it.
2. Payment Choices Prioritize Ease, Deals, and Security

Travelers select payment methods based on convenience, the best available deals, and security. Many prefer using cash-on-hand (e.g., debit) over credit or financing options like buy now, pay later.
3. Travelers Plan Around Payment Acceptance

Although credit cards are widely used, 73% of respondents have faced acceptance issues while traveling, with 42% choosing not to make a purchase as a result. To avoid complications, 72% plan ahead to ensure their preferred payment method is accepted, and 80% check for acceptance signage before spending.
4. North American Travelers Favor Credit Cards

While most global travelers prefer debit cards, North Americans rely heavily on credit—58% of respondents favor credit cards over debit (43%) or cash (40%).
5. Airline-Branded Credit Cards Are Popular

Among travel-specific credit cards, airline-branded options are the most widely used, with 15% of cardholders relying on them. These cards are particularly popular in Asia and North America.
6. Many Travelers Don’t Maximize Their Rewards

Although 43% of respondents have a travel rewards credit card, many don’t use their points. Millennials are the most likely to leverage travel rewards, and international travelers are more likely to own a rewards card than domestic travelers. However, only 54% of rewards cardholders use their points for personal travel.
By understanding these trends, merchants can optimize payment options to attract and accommodate travelers worldwide." }],
    "useCaseConfig": {
        "maxPairs": 10,
        "domain": "finance"
    },
    "modelConfig": {
        "temperature": 0.8,
        "topP": 1,
        "topK": -1,
        "presencePenalty": 2,
        "frequencyPenalty": 1,
        "maxTokens": 1,
        "apiKey": "API key specific to use case and model",
        "azureDeployment": "DEPLOYMENT_NAME",
        "azureEndpoint": "https://azure.endpoint.com",
        "googleProjectId": "[GOOGLE_PROJECT_ID]",
        "googleRegion": "[GOOGLE_PROJECT_REGION_OF_MODEL_ACCESS]"
    }
}
headers = {
    "Authorization": "<authorization>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "predictionId": "5e893b16-01f8-427c-9ca8-ba52b01b1ba3",
  "status": "SUBMITTED"
}

Headers

Authorization
string
required

Bearer token used for authentication.

Path Parameters

MODEL_ID
string
required

Unique identifier for the model.

Body

application/json
batch
object[]

The text analyzed to predict possible frequently asked questions and corresponding answers.

useCaseConfig
UseCaseConfigFaqEnrichment · object
modelConfig
ModelConfig · object

Provides fields and values that specify ranges for tokens. Fields used for specific use cases and models are specified. The default values are used if other values are not specified.

Response

OK

This is the response to the POST prediction request submitted for a specific useCase and modelId.

predictionId
string<uuid>

The universal unique identifier (UUID) returned in the POST request. This UUID is required in the GET request to retrieve results.

status
string

The current status of the prediction. Allowed values are:

  • SUBMITTED - The POST request was successful and the response has returned the predictionId and status that is used by the GET request.

  • ERROR - An error was generated when the GET request was sent.

  • READY - The results associated with the predictionId are available and ready to be retrieved.

  • RETRIEVED - The results associated with the predicitonId are returned successfully when the GET request was sent.

Example:

"SUBMITTED"