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

Good replacement for \n #36

Closed
teetone opened this issue Oct 26, 2022 · 1 comment
Closed

Good replacement for \n #36

teetone opened this issue Oct 26, 2022 · 1 comment

Comments

@teetone
Copy link

teetone commented Oct 26, 2022

Related: #17

Hi, since \n characters are ignored, what would be the next best option to use instead when prompting GLM with in-context examples?

For example, for other models where \n is not ignored, we input prompts that look like this:

Passage: The triangle is above the red sphere.
The pink rectangle is to the left of the red sphere.
Question: Is the triangle to the left of the pink rectangle?
Answer: no

Passage: The chest is bigger than the suitcase.
The box is bigger than the suitcase.
The chest fits inside the box.
The suitcase is bigger than the box of chocolates.
The container fits inside the box.
Question: Does the suitcase fit in the box?
Answer: yes

Passage: Mary travelled to the bedroom.
Daniel travelled to the office.
Daniel journeyed to the hallway.
Mary travelled to the hallway.
Sandra travelled to the kitchen.
Mary travelled to the kitchen.
John journeyed to the garden.
Daniel went to the bathroom.
Question: Where is Sandra?
Answer: kitchen

Passage: The hallway is west of the kitchen.
The office is east of the kitchen.
Question: What is the kitchen west of?
Answer: office

Passage: This morning Fred moved to the school.
Julie went back to the cinema yesterday.
Mary travelled to the bedroom yesterday.
Fred journeyed to the bedroom yesterday.
Bill travelled to the kitchen yesterday.
This afternoon Fred journeyed to the office.
Fred travelled to the park this evening.
Mary went to the office this morning.
This afternoon Mary went back to the cinema.
This morning Julie travelled to the office.
Question: Where was Mary before the office?
Answer: bedroom

Passage: The hallway is north of the office.
The bathroom is south of the office.
Question: What is north of the office?
Answer:

I was wondering what the best practice for prompt construction for GLM was, especially for the case where there are in-context examples.

@teetone teetone changed the title Good replacement for ` Good replacement for \n Oct 26, 2022
@Sengxian
Copy link
Contributor

Actually, the \n is <n> in the icetk tokenizer, you can safely replace '\n' with <n>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants